diff --git a/base/pkgtools/scripts/makepkg b/base/pkgtools/scripts/makepkg index 1d67084..f9c3577 100755 --- a/base/pkgtools/scripts/makepkg +++ b/base/pkgtools/scripts/makepkg @@ -314,13 +314,13 @@ echo rm -f ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} case $EXTENSION in 'tgz' | 'tar.gz' ) - # If $COMPRESSOPTS has not been exported and set by buildvars, try default compression levels - [ -z "$COMPRESSOPTS" ] && COMPRESSOPTS="-9c" + # If $compressopts has not been exported and set by buildvars, try default compression levels + [ -z "$compressopts" ] && compressopts="-9c" # Try pigz for parallel compression if which pigz > /dev/null 2>&1 ; then - $TAR cvf - . | pigz $COMPRESSOPTS > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} + $TAR cvf - . | pigz $compressopts > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} else - $TAR cvf - . | gzip $COMPRESSOPTS > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} + $TAR cvf - . | gzip $compressopts > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} fi ERRCODE=$? if [ ! $? = 0 ]; then @@ -328,20 +328,20 @@ case $EXTENSION in fi ;; 'tbz' | 'tar.bz2' ) - [ -z "$COMPRESSOPTS" ] && COMPRESSOPTS="-9c" - $TAR cvf - . | bzip2 $COMPRESSOPTS > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} + [ -z "$compressopts" ] && compressopts="-9c" + $TAR cvf - . | bzip2 $compressopts > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} ERRCODE=$? if [ ! $ERRCODE = 0 ]; then echo "ERROR: bzip2 returned error code $ERRCODE -- makepkg failed." fi ;; 'tlz' | 'tar.lz' ) - [ -z "$COMPRESSOPTS" ] && COMPRESSOPTS="-0c" + [ -z "$compressopts" ] && compressopts="-0c" # Try plzip for parallel compression if which plzip > /dev/null 2>&1 ; then - $TAR cvf - . | plzip $COMPRESSOPTS > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} + $TAR cvf - . | plzip $compressopts > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} else - $TAR cvf - . | lzip $COMPRESSOPTS > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} + $TAR cvf - . | lzip $compressopts > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} fi ERRCODE=$? if [ ! $ERRCODE = 0 ]; then @@ -349,8 +349,8 @@ case $EXTENSION in fi ;; 'txz' | 'tar.xz' ) - [ -z "$COMPRESSOPTS" ] && COMPRESSOPTS="-c" - $TAR cvf - . | xz $COMPRESSOPTS > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} + [ -z "$compressopts" ] && compressopts="-c" + $TAR cvf - . | xz $compressopts > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} ERRCODE=$? if [ ! $ERRCODE = 0 ]; then echo "ERROR: xz returned error code $ERRCODE -- makepkg failed." diff --git a/bldpkg b/bldpkg index b6744ee..4fbcc10 100755 --- a/bldpkg +++ b/bldpkg @@ -38,13 +38,14 @@ # file. Use -o -m for doing this, perhaps? # -> Email the user about the outcome of the build? -# Begin subshell -( +# Determine whether we are using bash version 4 and later. If not, exit. +if ((BASH_VERSINFO[0] < 4)) ; then + echo "[ERROR] bldpkg requires a minimum of bash shell version 4 to run" + exit 1 +fi -# Exit on any error -set -e - -# Time when the build commenced. Note: elapsed time is logged by the runtime function way below. This output goes into package build summary. +# Time when the build commenced. Note: elapsed time is logged by the runtime function way below. +# This output goes into package build summary. commencedate="$(date '+%a, %d %b %Y, %T')" # Function to generate help message @@ -69,7 +70,7 @@ has cd'd to $HOME/smlinux/alsa-lib alsa-lib.SMBuild # bldpkg -Building package 'alsa-lib' version '1.x' build '1sml'... +Building package 'alsa-lib' version '1.x'... ...build output... Usage: @@ -112,47 +113,21 @@ fi # Store the source directory path the build was initiated from srcdir="$PWD" -# Get relative directory name from SRCDIR -srcdirpath="$(basename $srcdir)" -buildfile="$srcdirpath.SMBuild" +# Presume that the build file name will match the name of the parent directory +# unless otherwise overridden using -f +buildfile="$(basename $srcdir).SMBuild" -# Generate sha512sums in the build file -genchecksum() { - # Checksum digest to be used along with arguments - checksumbinary="/bin/sha512sum" +# Find all required files. If either of them don't exist, abort. +rqfiles=( makepkg installpkg upgradepkg sha512sum patch find findmnt patch tput bc tar ) - # Check if the binary exists - if [[ ! -x $checksumbinary ]] ; then - echo "[ERROR] $checksumbinary does not exist!" - fi - - # File types whose checksums will go into the new build file - echo "[INFO] Discarding old sha512sums from $buildfile" - tempbuildfile="$buildfile" - sed -E -i \ - -e '/^sha512sums=".*"$/d' \ - -e '/^sha512sums="/,/"$/d' \ - -e "/^sha512sums='.*'\$/d" \ - "$buildfile" - - echo "[INFO] Adding new sha512sums in $tempbuildfile" - printf 'sha512sums="\n' >> "$tempbuildfile" - - files=( *.tar.* *.zip *.t?z *.patch *.diff *.c *.h ) - - # For loop that searches for files matching the above extension - # and prints them to the bottom of the build file - for file in ${files[@]} ; do - if [[ -f $file ]] ; then - $checksumbinary $file >> "$tempbuildfile" +for requiredfile in ${rqfiles[@]}; + do + if [[ ! -x $(type -p $requiredfile) ]] ; then + echo "[ERROR] Could not find $requiredfile!" + exit 1 fi done - printf '"' >> "$tempbuildfile" - echo "[INFO] You may now run bldpkg again" - exit 0 -} - # Function for providing handy arguments to users. Some will override bldpkg.conf. while getopts ':def:ghj:sx' option; do case "$option" in @@ -160,7 +135,7 @@ while getopts ':def:ghj:sx' option; do e) extractprompt=0; autoextract=1 ;; # Automatically extract the final pkg installer inside user's PWD f) setbuildfile="$OPTARG" ;; - g) genchecksum ;; + g) genchecksum=1 ;; h) help ;; j) customcputhreads="$OPTARG" ;; s) showsummary=1 ;; # Show build summary at the end of the build irrespective of the build status @@ -169,13 +144,13 @@ while getopts ':def:ghj:sx' option; do esac done -# The getopts builtin sets the OPTIND environment variable whose value is set to 1 if no argument is given. For every -# argument passed, the number is incremented by 1. In our case, if OPTIND equals 1, no argument was passed. We therefore expect -# a package build file to be present which will be then sourced. +# The getopts builtin sets the OPTIND environment variable whose value is set to 1 if no argument +# is given. For every argument passed, the number is incremented by 1. In our case, if OPTIND equals +# 1, no argument was passed. We therefore expect a package build file to be present which will be then sourced. if [[ $OPTIND = 1 ]] ; then if [[ ! -f $buildfile ]] ; then echo "[ERROR] No package build file to source from!" - echo "[ERROR] Was expecting $buildfile to be present in your pwd." + echo "[ERROR] Was expecting $buildfile to be present inside this directory '"$PWD"'." echo "[ERROR] Try -f if your build file has a different name (Not recommended)" exit 1 else @@ -185,9 +160,10 @@ if [[ $OPTIND = 1 ]] ; then # If OPTIND is greater than 1, check if a build file matching the parent directory exists, and if it does, source it. elif [[ $OPTIND -gt 1 ]] ; then - # Override cputhreads sourced from bldpkg.conf if customcputhreads is set + # Override cputhreads sourced from bldpkg.conf if customcputhreads is set. Need to append '-j' so that it gets + # passed on to MAKEFLAGS if [[ -n $customcputhreads ]] ; then - cputhreads="$customcputhreads" + cputhreads="-j$customcputhreads" fi # And validate whether the value is a number @@ -196,31 +172,53 @@ elif [[ $OPTIND -gt 1 ]] ; then exit 1 fi - # If the original predetermined $buildfile is set, source it - if [[ -f $buildfile ]] ; then - source $buildfile - # If that is not the case, then check if $setbuildfile is set and is a file. If it is not a file, then return an error. - elif [[ ! -f $buildfile ]] ; then - if [[ -n $setbuildfile ]] && [[ ! -f $setbuildfile ]] ; then - echo "[ERROR] $setbuildfile not found!" - exit 1 - # If $setbuildfile is set and is a file, source that file, else return an error an exit - elif [[ -n $setbuildfile ]] && [[ -f $setbuildfile ]] ; then - buildfile="$setbuildfile" - source $buildfile - else - echo "[ERROR] No package build file to source from!" - echo "[ERROR] Was expecting $buildfile to be present in your pwd." - echo "[ERROR] Try -f if your build file has a different name (Not recommended)" - exit 1 - fi + # If $setbuildfile is set and is a file, set buildfile to its value, source it and initialise the build + if [[ -n $setbuildfile ]] && [[ -f $setbuildfile ]] ; then + buildfile="$setbuildfile" + source $buildfile + # If $setbuildfile is set but a file passed as an argument is not found, give an error + elif [[ -n $setbuildfile ]] && [[ ! -f $setbuildfile ]] ; then + echo "[ERROR] $setbuildfile not found!" + exit 1 + # If the above two conditions don't meet, get the presumed $buildfile value as a file and source it + elif [[ -f "$buildfile" ]] ; then + source $buildfile + # If even that file is not found, throw an error and exit + else + echo "[ERROR] No package build file to source from!" + echo "[ERROR] Was expecting $buildfile to be present inside this directory '"$PWD"'." + echo "[ERROR] Try -f if your build file has a different name (Not recommended)" + exit 1 fi fi -# Determine whether we are using bash version 4 and later. If not, exit. -if ((BASH_VERSINFO[0] < 4)) ; then - echo "[ERROR] bldpkg requires a minimum of bash shell version 4 to run" - exit 1 +# Generate sha512sums in the build file +if [[ $genchecksum = 1 ]] ; then + + # File types whose checksums will go into the new build file + echo "[INFO] Discarding any old sha512sums from $buildfile" + sed -E -i \ + -e '/^sha512sums=".*"$/d' \ + -e '/^sha512sums="/,/"$/d' \ + -e "/^sha512sums='.*'\$/d" \ + "$buildfile" + + echo "[INFO] Adding new sha512sums in $buildfile" + printf 'sha512sums="\n' >> "$buildfile" + + files=( *.tar.* *.zip *.t?z *.patch *.diff *.c *.h ) + + # For loop that searches for files matching the above extension + # and prints them to the bottom of the build file + for file in ${files[@]} ; do + if [[ -f $file ]] ; then + sha512sum $file >> "$buildfile" + fi + done + + printf '"' >> "$buildfile" + echo "[INFO] You may now run bldpkg again" + exit 0 fi # Validate the build file. If any of the following variables are not set in the build file, abort. @@ -231,7 +229,7 @@ for buildvariables in app version build homepage desc requires ; do fi if egrep -q "$buildvariables='*'" "$buildfile" ; then - echo "Please dont use single quotes to define the \"${buildvariables}\" variable" + echo "[ERROR] Please dont use single quotes to define the \"${buildvariables}\" variable" exit 1 fi done @@ -289,6 +287,7 @@ if [[ $useauditd = 1 ]] ; then if [[ ! -x /bin/auditd ]] ; then echo "[ERROR] Auditd not found!" + exit 1 fi # First clear out the log file @@ -314,6 +313,7 @@ terminateauditd() { if [[ $auditlogtermsize -gt 10 ]] ; then echo "[WARNING] Auditd log file is greater than 10 lines!" echo "[WARNING] Highly recommend that you examine its file!" + sleep 5 fi fi } @@ -335,20 +335,35 @@ if [[ -z $skipchecksum ]] ; then for src in $sums; do echo "$src" | sha512sum -c + checksumresult=$? + if [[ $checksumresult != 0 ]] ; then + echo "[ERROR] Checksums failed to match!" + exit 1 + fi done unset IFS fi -# Function to output to the user which patch is about to be applied. Useful when there are many patches and you want to determine which patch failed. +# Function to output to the user which patch is about to be applied. Useful when there are many +# patches and you want to determine which patch failed. applypatch() { - if [[ -z $1 ]]; then + patchfile=$1 + if [[ -z $patchfile ]] ; then echo "[ERROR] Please provide valid patch file name" exit 1 + elif [[ ! -f $patchfile ]] ; then + echo "[ERROR] Patch file not found!" + exit 1 fi - relativepath="$(basename $1)" + relativepath="$(basename $patchfile)" echo "[INFO] Applying patch $relativepath.." - patch -p1 < "$1" + patch -p1 < "$patchfile" + patchresult=$? + if [[ $patchresult != 0 ]] ; then + echo "[ERROR] Patch file $patchfile failed to apply!" + exit 1 + fi } # Do a preliminary package dependency check if $checkdependencies is set to 1 in bldpkg.conf @@ -373,8 +388,8 @@ if [[ $checkdependencies = 1 ]] ; then fi -# Function to specifically match arrays inside a value. This function will be used later on to perform package and directory -# matches using certain conditions. Note: "${ARRAY[@]}" =~ "${VARIABLE}" isn't fool-proof. +# Function to specifically match arrays inside a value. This function will be used later on to perform +# package and directory matches using certain conditions. Note: "${ARRAY[@]}" =~ "${VARIABLE}" isn't fool-proof. inarray() { local n=$1 h shift @@ -394,7 +409,8 @@ elif [[ ! -d $parenttmp ]] ; then exit 1 fi -# Attempt to write to the $parenttmp directory. This directory is used for everything related to the build process outside #the source directory $srcdir +# Attempt to write to the $parenttmp directory. This directory is used for everything related to the +# build process outside the source directory $srcdir if ! touch "$parenttmp"/.smlinuxwritetest ; then echo "[ERROR] $parenttmp is not writable!" exit 1 @@ -429,14 +445,14 @@ EOF fi # Validate compressor and set extension -validpkgextensions=( "tgz" "tbz" "tlz" "txz" ) +validpkgextensions=( tgz tbz tlz txz ) if ! inarray "${pkgext}" "${validpkgextensions[@]}" ; then echo "[ERROR] $pkgext is not a valid package extension for an SMLinux installer file." exit 1 fi -# Figure out the compression tool to be used based on the $pkgext variable set in bldpkg.conf. At the same time, export the compressor -# options set for makepkg to import from the build environment. +# Figure out the compression tool to be used based on the $pkgext variable set in bldpkg.conf. +# At the same time, export the compressor options set for makepkg to import from the build environment. case "$pkgext" in tgz) compressor=gzip compressopts="$gzipopts" @@ -458,14 +474,15 @@ if ! $compressor --help > /dev/null 2>&1 ; then exit 1 fi -# Validate the TMPFS directory if usetmpfs is set to 1 and tmpfsdir variable is set. If it fails, declare a variable for the build summary. +# Validate the TMPFS directory if usetmpfs is set to 1 and tmpfsdir variable is set. If it fails, +# declare a variable for the build summary. if [[ $usetmpfs = 1 ]] && [[ -n $tmpfsdir ]]; then if [[ ! -d $tmpfsdir ]] || ! touch "$tmpfsdir/.smlinuxtmpwritetest" \ - || [[ "$(findmnt -no TARGET $tmpfsdir)" != "$tmpfsdir" ]] \ - || [[ "$(findmnt -no FSTYPE $tmpfsdir)" != "tmpfs" ]]; then - tmpfscheckfailed=1 + || [[ "$(findmnt -no TARGET $tmpfsdir)" != "$tmpfsdir" ]] \ + || [[ "$(findmnt -no FSTYPE $tmpfsdir)" != "tmpfs" ]]; then + tmpfscheckfailed=1 fi - + # Discard the file used to test the tmp directory [[ -e "$tmpfsdir/.smlinuxtmpwritetest" ]] && rm -f "$tmpfsdir/.smlinuxtmpwritetest" fi @@ -473,10 +490,10 @@ fi if [[ $swapcheck = 1 ]]; then if inarray "${app}" "${packagesrequiringswap[@]}" ; then - # Here we determine available system swap size needed to compile exceptional packages that pull in a lot of RAM. - # Those packages are listed under the packagesrequiringswap array in /etc/bldpkg.conf. Check whether swap - #is available on the system and if it is, determine its size. If its size is >= swapsize, we are all good. - #If it's less than swapsize, we exit with a status 1. + # Here we determine available system swap size needed to compile exceptional packages that pull + # in a lot of RAM. Those packages are listed under the packagesrequiringswap array in /etc/bldpkg.conf. + # Check whether swap is available on the system and if it is, determine its size. If its size + # is >= swapsize, we are all good. If it's less than swapsize, we exit with a status 1. swapcheck="$(grep "SwapFree" /proc/meminfo | awk '{print $2}')" if [[ $swapcheck -lt $swapsize ]]; then @@ -488,17 +505,17 @@ if [[ $swapcheck = 1 ]]; then fi fi -# Set the temporary directory for building the package. Also define package staging directory. This is where package files that get -# "installed" go into, for example 'make install DESTDIR=$pkg' or 'DESTDIR="$pkg" ninja install'. +# Set the temporary directory for building the package. Also define package staging directory. +# This is where package files that get "installed" go into, for example 'make install DESTDIR=$pkg' +# or 'DESTDIR="$pkg" ninja install'. -# If usetmpfs is set to 1, tmpfsdir is defined and tmpfscheckfailed variable is unset, determine if the $app is in the exception -# list and whether to build inside or outside the TMPFS directory. +# If usetmpfs is set to 1, tmpfsdir is defined and tmpfscheckfailed variable is unset, determine +# if the $app is in the exception list and whether to build inside or outside the TMPFS directory. if [[ $usetmpfs = 1 ]] && [[ -n $tmpfsdir ]] && [[ -z $tmpfscheckfailed ]] ; then - # If $app is in the TMPFS exception list inside /etc/bldpkg.conf, compile - # it *OUTSIDE* the TMPFS directory, i.e the non-TMPFS directory, else compile - # it *INSIDE* the TMPFS directory. This if/else is solely for deciding - # whether $app is in the exception list or not. + # If $app is in the TMPFS exception list inside /etc/bldpkg.conf, compile it *OUTSIDE* the TMPFS + # directory, i.e the non-TMPFS directory, else compile it *INSIDE* the TMPFS directory. This if/else + # is solely for deciding whether $app is in the exception list or not. if inarray "${app}" "${tmpfsexceptionlist[@]}" ; then # We DO NOT compile inside tmpfsdir @@ -508,8 +525,8 @@ if [[ $usetmpfs = 1 ]] && [[ -n $tmpfsdir ]] && [[ -z $tmpfscheckfailed ]] ; the tmp="$nontmpfsdir/$app.src" pkg="${pkg:-$nontmpfsdir/package-$app}" else - # We compile inside tmpfsdir. Set the tmpfsenabledforthispackage variable - # here to inform build summary function at the bottom + # We compile inside tmpfsdir. Set the tmpfsenabledforthispackage variable here to inform build + # summary function at the bottom tmpfsenabledforthispackage=1 # Disable ccache @@ -519,8 +536,7 @@ if [[ $usetmpfs = 1 ]] && [[ -n $tmpfsdir ]] && [[ -z $tmpfscheckfailed ]] ; the preservebuilddir=0 preservepackagedir=0 - # Get the directory from the tmpfsdir variable for extracting the source and - # set it as our build and staging directory + # Get the directory from the tmpfsdir variable for extracting the source and set it as our build and staging directory tmp="$tmpfsdir/$app.src" pkg="${pkg:-$tmpfsdir/package-$app}" @@ -612,6 +628,25 @@ if [[ $globaldistcc = 1 ]] ; then PATH="$(echo "$PATH" | sed "s@:$distccsympath@@g")" export PATH else + # netcat hosts inside $DISTCC_HOSTS by checking for an open port + echo "Validating hosts supplied in DISTCC_HOSTS variable" + # Check if we have nc + if [[ ! -x /bin/nc ]] ; then + echo "[WARNING] nc does not exist! Ignoring this..." + else + # Remove the common options along with the slash and the numbers after it + hosts="$(echo $DISTCC_HOSTS | sed -e 's@/[a-z0-9]*@@g' -e 's@--randomize@@' -e 's@localhost@@' -e 's@,lzo@@g')" + for host in ${hosts[@]} ; do + # We only run distccd on TCP port 3632 + if ! /bin/nc -z $host 3632 > /dev/null 2>&1 ; then + echo "[WARNING] Distcc host '"$host"' is OFFLINE" + sleep 0.5 + echo "Rewriting DISTCC_HOSTS" + DISTCC_HOSTS="$(echo $DISTCC_HOSTS | sed "s@$host/[a-z0-9,]*@@")" + fi + done + fi + export DISTCC_HOSTS DISTCC_IO_TIMEOUT fi else @@ -778,8 +813,8 @@ fi # https://www.raspberrypi.org/forums/viewtopic.php?t=11629 # noarch is set inside initfs, pkgtools, GTK themes and some other stuff. -# If $arch has not been exported by autobuild or not set in the individual build files that have arch=noarch, we set our own -# $HOSTTYPE is only set in the bash shell. +# If $arch has not been exported by autobuild or not set in the individual build files that have +# arch=noarch, we set our own $HOSTTYPE is only set in the bash shell. [[ -z $arch ]] && arch="$HOSTTYPE" if [[ $arch = noarch ]]; then @@ -899,8 +934,8 @@ runtime() { preprunitservice() { # usage: $ preprunitservice - # Will create the chrony service directories with a down and a finish file to prevent auto-execution at next boot - # and to provide a clean exit respectively. Use the first argument to define the service name + # Will create the chrony service directories with a down and a finish file to prevent auto-execution + # at next boot and to provide a clean exit respectively. Use the first argument to define the service name rsname=$1 # Use the second argument to add the down file down=$2 @@ -1067,17 +1102,17 @@ EOF totaldircount="$(find $pkg -type d | wc -l)" totalsymcount="$(find $pkg -type l | wc -l)" packusize1="$(du -s $pkg | awk '{print $1}')" - fi - # Here we ascertain the packaging time taken to actually prepare the final package. For this, we must reset the - # SECONDS variable to ensure accuracy + + # Here we ascertain the packaging time taken to actually prepare the final package. For this, we + # must reset the SECONDS variable to ensure accuracy SECONDS=0 # Store package location inside this variable: newpkglocation="$pkgdest/$app-$version-$arch-$build.$pkgext" # Finally create the package - /bin/makepkg -l y -c n "$newpkglocation" + makepkg -l y -c n "$newpkglocation" pkgstatus=$? # Terminate auditd daemon @@ -1092,8 +1127,8 @@ EOF if [[ $showsummary = 1 ]] || [[ $htmloutput = 1 ]] ; then - # With SECONDS reset, the shell will add in a fresh value, which we can now use to ascertain the packaging time, - # by again passing that value as an argument to the runtime function + # With SECONDS reset, the shell will add in a fresh value, which we can now use to ascertain + # the packaging time, by again passing that value as an argument to the runtime function packagetimea="$SECONDS" packagetimeb="$( runtime $packagetimea )" fi @@ -1148,7 +1183,7 @@ prepbuildoutput() { # Get the build completion time and store it in a variable finishdate="$(date '+%a, %d %b %Y, %T')" - # If compiletimea is set, then do a sum total of compiletimea and packagetimea variables to get the + # If compiletimea is set, then do a sum total of compiletimea and packagetimea variables to get the # total time in seconds and use that as an argument for the runtime function. If compiletimea is not set, # invoke the runtime function alone on new reset $SECONDS if [[ -n $compiletimea ]] && [[ $pkgstatus = 0 ]] ; then @@ -1426,8 +1461,8 @@ promptuser() { done fi - # Prompt the user at the end of a successful build whether to install the newly created package. Has no effect on - # autobuilds because packages there are installed automatically. + # Prompt the user at the end of a successful build whether to install the newly created package. + # Has no effect on autobuilds because packages there are installed automatically. if [[ $installprompt = 1 ]] && [[ -z $autobuild ]] && [[ -n $newpkglocation ]] ; then while true ; do echo @@ -1448,8 +1483,8 @@ promptuser() { fi } -# This function will set the interrupt variable so prepbuildoutput can output the right build status on receiving -# ctrl-c from the user during a manual build. +# This function will set the interrupt variable so prepbuildoutput can output the right build status +# on receiving ctrl-c from the user during a manual build. interruptoutput() { echo "" echo "[INFO] Caught Keyboard Interrupt" @@ -1480,5 +1515,4 @@ trap "interruptoutput" INT build -) -# End subshell and script +# End script