| 1 |
#!/bin/bash |
| 2 |
# |
| 3 |
# rolltarball.sh - rolls a tarball for distribution |
| 4 |
# |
| 5 |
# Copyright 2005 Gentoo Foundation |
| 6 |
# Distributed under the terms of the GNU General Public License v2 |
| 7 |
# $Header: $ |
| 8 |
# |
| 9 |
# Before commiting large changes, or if you don't completely understand a |
| 10 |
# small change you are about to commit, please consult the Primary Maintainer |
| 11 |
# first to make sure it won't break things. Thanks! |
| 12 |
# |
| 13 |
# Contributors: |
| 14 |
# Michael Stewart <vericgar@gentoo.org> (Primary Maintainer) |
| 15 |
# Christian Parpart <trapni@gentoo.org> |
| 16 |
# |
| 17 |
# Changes: |
| 18 |
# 05-Jun-2005 Complete rewrite to clean up code |
| 19 |
# |
| 20 |
MYVERSION='$Revision: 1.0 $' |
| 21 |
MYVERSION=${MYVERSION#* } |
| 22 |
MYVERSION=${MYVERSION% *} |
| 23 |
|
| 24 |
# ********** Begin functions ********** |
| 25 |
|
| 26 |
usage() { |
| 27 |
|
| 28 |
if [ -n "$1" ] |
| 29 |
then |
| 30 |
eerror $1 |
| 31 |
else |
| 32 |
cat <<-USAGE_HEADER |
| 33 |
Gentoo Apache Tarball Generator |
| 34 |
Version: ${MYVERSION} |
| 35 |
USAGE_HEADER |
| 36 |
fi |
| 37 |
|
| 38 |
# there are no tabs in the following!!! |
| 39 |
cat <<USAGE |
| 40 |
|
| 41 |
Usage: $0 [options] ebuild |
| 42 |
|
| 43 |
Where options is any of: |
| 44 |
-a --ask Display what would be done, then ask to do it (default) |
| 45 |
-A --no-ask Disable ask |
| 46 |
-t --color Turn on color |
| 47 |
-T --no-color Turn off color |
| 48 |
-c --copyto=path Copy tarball to local path (default: /usr/portage/distfiles) |
| 49 |
-C --no-copy Don't copy tarball |
| 50 |
-d --devspace Upload to devspace (default) |
| 51 |
-D --no-devspace Don't upload to devspace |
| 52 |
-g --digest Create the digest (default) |
| 53 |
-G --no-digest Don't create the digest |
| 54 |
-e --ebuild Modify ebuild (default) |
| 55 |
-E --no-ebuild Don't modify ebuild |
| 56 |
-h --help Display this output |
| 57 |
-m --mirror Upload to mirror://gentoo |
| 58 |
-M --no-mirror Don't upload to mirror://gentoo (default) |
| 59 |
-p --pretend Only display what would be done |
| 60 |
--quiet Set verbosity to 0 |
| 61 |
-q Lower verbosity by 1 |
| 62 |
-u --user=username Gentoo Username (Default: auto-detected) |
| 63 |
--verbosity=n Verbosity Level (0-4) |
| 64 |
-v Increase verbosity by 1 |
| 65 |
|
| 66 |
For convienence, ~/.apache-rolltarball will be sourced so you can set any |
| 67 |
of the following instead of using the command line: |
| 68 |
|
| 69 |
ASK Ask before doing anything (0 = no, 1 = yes) |
| 70 |
COLOR Output in color (0 = no, 1 = yes) |
| 71 |
COPYTO Local path to copy tarball to (set to blank to disable copy) |
| 72 |
G_USER Gentoo Username |
| 73 |
MOD_EBUILD Modify ebuild (0 = no, 1 = yes) |
| 74 |
UPLOAD_DEV Whether to upload to devspace (0 = no, 1 = yes) |
| 75 |
UPLOAD_MIRROR Whether to upload to gentoo mirrors (0 = no, 1 = yes) |
| 76 |
VERBOSE Level of verbosity (0-3) |
| 77 |
|
| 78 |
USAGE |
| 79 |
|
| 80 |
exit |
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
eerror() { |
| 85 |
echo -e " ${BAD}*${NORMAL} ${*}" |
| 86 |
} |
| 87 |
|
| 88 |
|
| 89 |
die() { |
| 90 |
if [ "$#" -gt 0 ] |
| 91 |
then |
| 92 |
eerror ${*} |
| 93 |
fi |
| 94 |
exit 1 |
| 95 |
} |
| 96 |
|
| 97 |
|
| 98 |
einfo() { |
| 99 |
if [ "${VERBOSE}" -ge "1" ] |
| 100 |
then |
| 101 |
echo -e " ${GOOD}*${NORMAL} ${*}" |
| 102 |
fi |
| 103 |
} |
| 104 |
|
| 105 |
|
| 106 |
ebegin() { |
| 107 |
if [ "${VERBOSE}" -ge "1" ] |
| 108 |
then |
| 109 |
echo -e " ${GOOD}*${NORMAL} ${*}..." |
| 110 |
fi |
| 111 |
} |
| 112 |
|
| 113 |
|
| 114 |
eend() { |
| 115 |
|
| 116 |
if [ "$#" -eq 0 ] || ([ -n "$1" ] && [ "$1" -eq 0 ]) |
| 117 |
then |
| 118 |
if [ "${VERBOSE}" -ge "1" ] |
| 119 |
then |
| 120 |
echo -e "${ENDCOL} ${BRACKET}[ ${GOOD}ok${BRACKET} ]${NORMAL}" |
| 121 |
fi |
| 122 |
else |
| 123 |
retval=$1 |
| 124 |
|
| 125 |
if [ "$#" -ge 2 ] |
| 126 |
then |
| 127 |
shift |
| 128 |
eerror "${*}" |
| 129 |
fi |
| 130 |
if [ "${VERBOSE}" -ge "1" ] |
| 131 |
then |
| 132 |
echo -e "${ENDCOL} ${BRACKET}[ ${BAD}!!${BRACKET} ]${NORMAL}" |
| 133 |
fi |
| 134 |
return ${retval} |
| 135 |
fi |
| 136 |
|
| 137 |
} |
| 138 |
|
| 139 |
|
| 140 |
ewarn() { |
| 141 |
if [ "${VERBOSE}" -ge "2" ] |
| 142 |
then |
| 143 |
echo -e " ${WARN}*${NORMAL} ${*}" |
| 144 |
fi |
| 145 |
} |
| 146 |
|
| 147 |
|
| 148 |
edebug() { |
| 149 |
if [ "${VERBOSE}" -ge "4" ] |
| 150 |
then |
| 151 |
echo -e " ${HILITE}*${NORMAL} ${*}" |
| 152 |
fi |
| 153 |
} |
| 154 |
|
| 155 |
|
| 156 |
nocolor() { |
| 157 |
COLS="80" |
| 158 |
ENDCOL=" *****>>" |
| 159 |
GOOD= |
| 160 |
WARN= |
| 161 |
BAD= |
| 162 |
NORMAL= |
| 163 |
HILITE= |
| 164 |
BRACKET= |
| 165 |
COLOR=0 |
| 166 |
edebug "Color disabled" |
| 167 |
} |
| 168 |
|
| 169 |
|
| 170 |
color() { |
| 171 |
COLS=$(stty size 2> /dev/null) |
| 172 |
COLS=${COLS#* } |
| 173 |
COLS=$((${COLS} - 7)) |
| 174 |
ENDCOL=$'\e[A\e['${COLS}'G' |
| 175 |
GOOD=$'\e[32;01m' |
| 176 |
WARN=$'\e[33;01m' |
| 177 |
BAD=$'\e[31;01m' |
| 178 |
NORMAL=$'\e[0m' |
| 179 |
HILITE=$'\e[36;01m' |
| 180 |
BRACKET=$'\e[34;01m' |
| 181 |
COLOR=1 |
| 182 |
edebug "Color enabled" |
| 183 |
} |
| 184 |
|
| 185 |
# ********** End functions, begin primary code ********** |
| 186 |
|
| 187 |
# Defaults |
| 188 |
# If you change these, change usage() |
| 189 |
ASK=1 |
| 190 |
COLOR=1 |
| 191 |
COPYTO=/usr/portage/distfiles |
| 192 |
DIGEST=1 |
| 193 |
G_USER= |
| 194 |
MOD_EBUILD=1 |
| 195 |
PRETEND=0 |
| 196 |
UPLOAD_DEV=1 |
| 197 |
UPLOAD_MIRROR=0 |
| 198 |
VERBOSE=1 |
| 199 |
|
| 200 |
# load configuration |
| 201 |
if [ -e ~/.apache-rolltarball ] |
| 202 |
then |
| 203 |
. ~/.apache-rolltarball |
| 204 |
edebug "Loaded configuration from ~/.apache-rolltarball" |
| 205 |
fi |
| 206 |
|
| 207 |
if [ "${COLOR}" -eq "0" ] |
| 208 |
then |
| 209 |
nocolor; |
| 210 |
else |
| 211 |
color; |
| 212 |
fi |
| 213 |
|
| 214 |
# Process command line |
| 215 |
until [ -z "$1" ] |
| 216 |
do |
| 217 |
case "$1" in |
| 218 |
--*) |
| 219 |
# long options |
| 220 |
OPTFULL=${1/--/} |
| 221 |
OPT=${OPTFULL%=*} |
| 222 |
VALUE=${OPTFULL#*=} |
| 223 |
case "${OPT}" in |
| 224 |
ask) ASK=1;; |
| 225 |
no-ask) ASK=0;; |
| 226 |
color) color;; |
| 227 |
no-color) nocolor;; |
| 228 |
copyto) COPYTO=${VALUE};; |
| 229 |
no-copy) COPYTO=;; |
| 230 |
devspace) UPLOAD_DEV=1;; |
| 231 |
no-devspace) UPLOAD_DEV=0;; |
| 232 |
digest) DIGEST=1;; |
| 233 |
no-digest) DIGEST=0;; |
| 234 |
ebuild) MOD_EBUILD=1;; |
| 235 |
no-ebuild) MOD_EBUILD=0;; |
| 236 |
help) usage;; |
| 237 |
mirror) UPLOAD_MIRROR=1;; |
| 238 |
no-mirror) UPLOAD_MIRROR=0;; |
| 239 |
pretend) PRETEND=1;; |
| 240 |
quiet) VERBOSE=0;; |
| 241 |
user) G_USER=${VALUE};; |
| 242 |
verbosity) VERBOSE=${VALUE};; |
| 243 |
*) |
| 244 |
usage "Unknown option: --${OPT}" |
| 245 |
;; |
| 246 |
esac |
| 247 |
shift |
| 248 |
;; |
| 249 |
-*) |
| 250 |
# short options |
| 251 |
OPTLIST=${1/-/} |
| 252 |
shift |
| 253 |
while [ -n "${OPTLIST}" ] |
| 254 |
do |
| 255 |
OPT=${OPTLIST:0:1} |
| 256 |
OPTLIST=${OPTLIST#?} |
| 257 |
case "${OPT}" in |
| 258 |
a) ASK=1;; |
| 259 |
A) ASK=0;; |
| 260 |
c) COPYTO=$1; shift;; |
| 261 |
C) COPYTO=;; |
| 262 |
d) UPLOAD_DEV=1;; |
| 263 |
D) UPLOAD_DEV=0;; |
| 264 |
e) MOD_EBUILD=1;; |
| 265 |
E) MOD_EBUILD=0;; |
| 266 |
g) DIGEST=1;; |
| 267 |
G) DIGEST=0;; |
| 268 |
h) usage;; |
| 269 |
m) UPLOAD_MIRROR=1;; |
| 270 |
M) UPLOAD_MIRROR=0;; |
| 271 |
p) PRETEND=1;; |
| 272 |
q) VERBOSE=$((${VERBOSE} - 1));; |
| 273 |
t) color;; |
| 274 |
T) nocolor;; |
| 275 |
u) G_USER=$1; shift;; |
| 276 |
v) VERBOSE=$((${VERBOSE} + 1));; |
| 277 |
*) |
| 278 |
usage "Unknown option: -${OPT}" |
| 279 |
;; |
| 280 |
esac |
| 281 |
done |
| 282 |
;; |
| 283 |
*) |
| 284 |
if [ -n "${EBUILD}" ] |
| 285 |
then |
| 286 |
usage "Only one ebuild can be specified" |
| 287 |
else |
| 288 |
EBUILD=$1 |
| 289 |
shift |
| 290 |
fi |
| 291 |
;; |
| 292 |
esac |
| 293 |
done |
| 294 |
|
| 295 |
if [ -z "${EBUILD}" ] |
| 296 |
then |
| 297 |
usage "You must specify an ebuild" |
| 298 |
fi |
| 299 |
|
| 300 |
if [ "${EBUILD##*.}" != "ebuild" ] |
| 301 |
then |
| 302 |
usage "You must specify an ebuild" |
| 303 |
fi |
| 304 |
|
| 305 |
if [ ! -f ${EBUILD} ] |
| 306 |
then |
| 307 |
die "Ebuild ${EBUILD} does not exist or is not a file" |
| 308 |
fi |
| 309 |
|
| 310 |
if [ "${VERBOSE}" -lt "0" ] |
| 311 |
then |
| 312 |
VERBOSE=0 |
| 313 |
fi |
| 314 |
|
| 315 |
if [ "${VERBOSE}" -gt "4" ] |
| 316 |
then |
| 317 |
VERBOSE=4 |
| 318 |
fi |
| 319 |
|
| 320 |
if [ "${VERBOSE}" -ge "3" ] |
| 321 |
then |
| 322 |
edebug "Program output enabled" |
| 323 |
exec 9>&1 |
| 324 |
else |
| 325 |
edebug "Program output disabled" |
| 326 |
exec 9>/dev/null |
| 327 |
fi |
| 328 |
|
| 329 |
if [ "${ASK}" -eq "1" ] |
| 330 |
then |
| 331 |
PRETEND=1 |
| 332 |
fi |
| 333 |
|
| 334 |
if [ -z "${G_USER}" ] |
| 335 |
then |
| 336 |
G_USER=$(cat CVS/Root) |
| 337 |
G_USER=${G_USER/:ext:/} |
| 338 |
G_USER=${G_USER%@*} |
| 339 |
einfo "Detected Gentoo Developer: ${G_USER}" |
| 340 |
fi |
| 341 |
|
| 342 |
edebug "Current configuration:" |
| 343 |
edebug " ASK: ${ASK}" |
| 344 |
edebug " COLOR: ${COLOR}" |
| 345 |
edebug " COPYTO: ${COPYTO}" |
| 346 |
edebug " DIGEST: ${DIGEST}" |
| 347 |
edebug " EBUILD: ${EBUILD}" |
| 348 |
edebug " G_USER: ${G_USER}" |
| 349 |
edebug " MOD_EBUILD: ${MOD_EBUILD}" |
| 350 |
edebug " PRETEND: ${PRETEND}" |
| 351 |
edebug " UPLOAD_DEV: ${UPLOAD_DEV}" |
| 352 |
edebug " UPLOAD_MIRROR: ${UPLOAD_MIRROR}" |
| 353 |
edebug " VERBOSE: ${VERBOSE}" |
| 354 |
|
| 355 |
my_mtime=$(stat --format=%Y $0) |
| 356 |
|
| 357 |
ebegin "Updating tree" |
| 358 |
cvs up >&9 |
| 359 |
eend $? "cvs update failed!" || die |
| 360 |
|
| 361 |
new_mtime=$(stat --format=%Y $0) |
| 362 |
if [ "${my_mtime}" -ne "${new_mtime}" ] |
| 363 |
then |
| 364 |
einfo "A new version of $0 is available" |
| 365 |
einfo "Please restart $0" |
| 366 |
die |
| 367 |
fi |
| 368 |
|
| 369 |
edebug "Detecting settings for tarball based on ebuild name" |
| 370 |
|
| 371 |
EBUILD_BASE=$(basename ${EBUILD}) |
| 372 |
EBUILD_NAME=${EBUILD_BASE/-[0-9]*/} |
| 373 |
TB_VER=${EBUILD_BASE/${EBUILD_NAME}-/} |
| 374 |
TB_VER=${TB_VER/.ebuild/} |
| 375 |
DATESTAMP=$(date +%Y%m%d) |
| 376 |
|
| 377 |
case ${EBUILD_NAME} in |
| 378 |
apache) |
| 379 |
TREE=${TB_VER%.*} |
| 380 |
TB=gentoo-apache-${TB_VER}-${DATESTAMP}.tar.bz2 |
| 381 |
TB_DIR=gentoo-apache-${TB_VER} |
| 382 |
;; |
| 383 |
gentoo-webroot-default) |
| 384 |
TREE=gentoo-webroot-default |
| 385 |
TB=gentoo-webroot-default-${TB_VER}.tar.bz2 |
| 386 |
TB_DIR=gentoo-webroot-default-${TB_VER} |
| 387 |
MOD_EBUILD=0 |
| 388 |
UPLOAD_MIRROR=1 |
| 389 |
UPLOAD_DEV=0 |
| 390 |
einfo "Have you version-bumped gentoo-webroot-default?" |
| 391 |
einfo "If not, press Ctrl-C now and do so, specifying the new ebuild" |
| 392 |
sleep 5 |
| 393 |
;; |
| 394 |
*) |
| 395 |
die "Don't know what to do for ebuild: ${EBUILD_NAME}";; |
| 396 |
esac |
| 397 |
|
| 398 |
edebug " TREE: ${TREE}" |
| 399 |
edebug " TB: ${TB}" |
| 400 |
edebug " TB_DIR: ${TB_DIR}" |
| 401 |
|
| 402 |
# simply returns true or false based on whether we are in pretend mod or not |
| 403 |
pretend() { |
| 404 |
if [ "${PRETEND}" -eq 1 ] |
| 405 |
then |
| 406 |
true |
| 407 |
return $? |
| 408 |
else |
| 409 |
false |
| 410 |
return $? |
| 411 |
fi |
| 412 |
} |
| 413 |
|
| 414 |
|
| 415 |
# we put all this in a function so that we can simply call it again when |
| 416 |
# the result of asking is yes. |
| 417 |
CURTIME=`date -u` |
| 418 |
build_tarball() { |
| 419 |
|
| 420 |
pretend && einfo "Actions to be taken:" |
| 421 |
|
| 422 |
pretend && einfo " Create ${TB} from ${TREE}/" |
| 423 |
pretend || { |
| 424 |
ebegin "Creating ${TB} from ${TREE}/" |
| 425 |
edebug "Copy recursive, hard-link where possible: ${TREE} -> ${TB_DIR}" |
| 426 |
cp -Rl ${TREE} ${TB_DIR} >&9 || eend $? "Copy failed" || die |
| 427 |
edebug "Create ${TB_DIR}/DATESTAMP with current time (${CURTIME}), packager (${G_USER}), and script version (${MYVERSION})" |
| 428 |
echo ${CURTIME} > ${TB_DIR}/DATESTAMP |
| 429 |
echo "Packaged by ${G_USER}" >> ${TB_DIR}/DATESTAMP |
| 430 |
echo "$0 v${MYVERSION}" >> ${TB_DIR}/DATESTAMP |
| 431 |
edebug "Create bzip2-ed tarball ${TB} from ${TB_DIR} excluding CVS" |
| 432 |
tar --create --bzip2 --verbose --exclude=CVS --file ${TB} ${TB_DIR} >&9 |
| 433 |
eend $? "Tarball creation failed" || die |
| 434 |
edebug "Remove temporary directory" |
| 435 |
rm -rf ${TB_DIR} || ewarn "Couldn't clean up, manually remove ${TB_DIR}/" |
| 436 |
} |
| 437 |
|
| 438 |
if [ -n "${COPYTO}" ] |
| 439 |
then |
| 440 |
if [ -d ${COPYTO} -a -w ${COPYTO} ] |
| 441 |
then |
| 442 |
pretend && einfo " Copy ${TB} to ${COPYTO}" |
| 443 |
pretend || { |
| 444 |
ebegin "Copying ${TB} to ${COPYTO}" |
| 445 |
cp ${TB} ${COPYTO} >&9 |
| 446 |
eend $? |
| 447 |
} |
| 448 |
else |
| 449 |
ewarn "${COPYTO} is not a directory or not writable, skipping copy" |
| 450 |
fi |
| 451 |
else |
| 452 |
edebug "Copy not enabled" |
| 453 |
fi |
| 454 |
|
| 455 |
if [ "${UPLOAD_DEV}" -eq 1 ] |
| 456 |
then |
| 457 |
pretend && einfo " Upload ${TB} to" |
| 458 |
pretend && einfo " http://dev.gentoo.org/~${G_USER}/dist/apache/" |
| 459 |
pretend || { |
| 460 |
einfo "Uploading ${TB} to" |
| 461 |
ebegin " http://dev.gentoo.org/~${G_USER}/dist/apache/" |
| 462 |
edebug "Making directories on dev.gentoo.org: ~/public_html/dist/apache" |
| 463 |
ssh ${G_USER}@dev.gentoo.org 'mkdir -pm 0755 ~/public_html/dist/apache/' >&9 || eend $? "Failed to make directories" || die |
| 464 |
|
| 465 |
edebug "scp ${TB} ${G_USER}@dev.gentoo.org:~/public_html/dist/apache" |
| 466 |
scp ${TB} ${G_USER}@dev.gentoo.org:~/public_html/dist/apache >&9 || eend $? "Failed to upload" || die |
| 467 |
edebug "Setting tarball permissions to 0644" |
| 468 |
ssh ${G_USER}@dev.gentoo.org "chmod 0755 ~/public_html/dist ~/public_html/dist/apache" && ssh ${G_USER}@dev.gentoo.org "chmod 0644 ~/public_html/dist/apache/${TB}" |
| 469 |
eend $? "Failed to set permissions" || die |
| 470 |
} |
| 471 |
else |
| 472 |
edebug "Upload to devspace not enabled" |
| 473 |
fi |
| 474 |
|
| 475 |
if [ "${UPLOAD_MIRROR}" -eq 1 ] |
| 476 |
then |
| 477 |
pretend && einfo " Upload ${TB} to mirror://gentoo/" |
| 478 |
pretend || { |
| 479 |
ebegin "Uploading ${TB} to mirror://gentoo/" |
| 480 |
edebug "scp ${TB} ${G_USER}@dev.gentoo.org:/space/distfiles-local" |
| 481 |
scp ${TB} ${G_USER}@dev.gentoo.org:/space/distfiles-local >&9 || eend $? "Failed to upload" || die |
| 482 |
edebug "Setting tarball permissions to 0644" |
| 483 |
ssh ${G_USER}@dev.gentoo.org "chmod 0644 /space/distfiles-local/${TB}" |
| 484 |
eend $? "Failed to set permissions" || die |
| 485 |
einfo "Please remember it can take up to 24 hours for full propogation" |
| 486 |
einfo "Make sure the tarball is available before marking a package stable" |
| 487 |
} |
| 488 |
else |
| 489 |
edebug "Upload to mirrors not enabled" |
| 490 |
fi |
| 491 |
|
| 492 |
if [ "${MOD_EBUILD}" -eq 1 ] |
| 493 |
then |
| 494 |
if [ -r ${EBUILD} ] |
| 495 |
then |
| 496 |
pretend && einfo " Update GENTOO_PATCHSTAMP and GENTOO_DEVSPACE" |
| 497 |
pretend || { |
| 498 |
ebegin "Updating GENTOO_PATCHSTAMP and GENTOO_DEVSPACE" |
| 499 |
sed -i -e "s/GENTOO_PATCHSTAMP=\".*\"/GENTOO_PATCHSTAMP=\"${DATESTAMP}\"/" ${EBUILD} && |
| 500 |
sed -i -e "s/GENTOO_DEVSPACE=\".*\"/GENTOO_DEVSPACE=\"${G_USER}\"/" ${EBUILD} |
| 501 |
eend $? "Failed to modify ebuild" || { |
| 502 |
einfo "It's highly recommended that you delete the ebuild" |
| 503 |
einfo "and cvs up and then modify the ebuild manually." |
| 504 |
die |
| 505 |
} |
| 506 |
} |
| 507 |
else |
| 508 |
ewarn "Unable to write to ebuild - skipping modification" |
| 509 |
fi |
| 510 |
else |
| 511 |
edebug "Modify ebuild not enabled" |
| 512 |
fi |
| 513 |
|
| 514 |
if [ "${DIGEST}" -eq 1 ] |
| 515 |
then |
| 516 |
pretend && einfo " Regenerate digests" |
| 517 |
pretend || { |
| 518 |
ebegin "Regenerating digests" |
| 519 |
ebuild ${EBUILD} digest >&9 |
| 520 |
eend $? |
| 521 |
} |
| 522 |
else |
| 523 |
edebug "Regenerate digest not enabled" |
| 524 |
fi |
| 525 |
|
| 526 |
pretend && einfo "No actions actually taken" |
| 527 |
if [ "${ASK}" -eq 1 ] |
| 528 |
then |
| 529 |
einfo "Would you like to perform the above actions?" |
| 530 |
echo -n "Type 'Yes' or 'No'> " |
| 531 |
read ask_in |
| 532 |
if [ "${ask_in}" == "Yes" -o "${ask_in}" == "yes" ] |
| 533 |
then |
| 534 |
ASK=0 |
| 535 |
PRETEND=0 |
| 536 |
build_tarball |
| 537 |
fi |
| 538 |
fi |
| 539 |
|
| 540 |
} |
| 541 |
|
| 542 |
build_tarball |
| 543 |
|
| 544 |
# vim:ai:noet:ts=4:nowrap |