diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2019-02-27 10:26:06 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2019-10-19 14:18:55 -0400 |
commit | 416e2369e254f27ab4ae42340b29eef65fe35730 (patch) | |
tree | f9882d36c6f9c3751eb3e110984a2cc5c82522ef | |
parent | 79ba22a7e7250b0f1f1fd80b20d0ba08eaac81b8 (diff) |
housekeeping - sq - rebuild.sh
-rwxr-xr-x | configs/profile/build.sh | 3 | ||||
-rwxr-xr-x | configs/profile/rebuild.sh | 27 |
2 files changed, 21 insertions, 9 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh index 098b595..9e0c783 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -149,6 +149,7 @@ make_packages() { _cache_base_packages=${_cache_base_packages// /} _install_gui_packages=${_install_gui_packages// /} _cache_gui_packages=${_cache_gui_packages// /} + # display results local _install_packages="${_install_base_packages} ${_install_gui_packages}" local _cache_packages="${_cache_base_packages} ${_cache_gui_packages}" @@ -346,7 +347,7 @@ make_aitab() { # Build all filesystem images specified in aitab (.fs.sfs .sfs) make_prepare() { cp -a -l -f ${work_dir}/${arch}/root-image ${work_dir} - setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} pkglist + setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -C ${pacman_conf} pkglist setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -C ${pacman_conf} ${offline_switch} prepare rm -rf ${work_dir}/root-image diff --git a/configs/profile/rebuild.sh b/configs/profile/rebuild.sh index 416b947..a7e1af3 100755 --- a/configs/profile/rebuild.sh +++ b/configs/profile/rebuild.sh @@ -4,23 +4,29 @@ readonly MODE='wipe' # total wipe of work dir optionally preservi readonly PRESERVE_CACHE='false' # preserve package cache in 'wipe' mode # readonly MODE='rebuild' # full update rebuild preserving work dir # readonly MODE='tweak' # apply chroot customization tweaks only -readonly TARGET='dual' # dual-arch (default) -# readonly TARGET='i686' # i686 target only +#readonly TARGET='dual' # dual-arch (default) +readonly TARGET='i686' # i686 target only # readonly TARGET='x86_64' # x86_64 target only # readonly EDITION='OpenRC/CLI' # OpenRC/CLI init/WM-DE pair -# readonly EDITION='OpenRC/LXDE' # OpenRC/LXDE init/WM-DE pair -readonly EDITION='SystemD/CLI' # SystemD/CLI init/WM-DE pair (default) +readonly EDITION='OpenRC/LXDE' # OpenRC/LXDE init/WM-DE pair +# readonly EDITION='SystemD/CLI' # SystemD/CLI init/WM-DE pair (default) # readonly EDITION='SystemD/LXDE' # SystemD/LXDE init/WM-DE pair readonly TALKING='' # speech and braille disabled (default) -# readonly TALKING='-S' # speech and braille enabled +#readonly TALKING='-S' # speech and braille enabled readonly CACHE='' # net-install (default) -# readonly CACHE='-O' # offline install +#readonly CACHE='-O' # offline install readonly VERSION="`date +%Y.%m.%d`" # for ISO filename (default) # readonly VERSION="`date +%Y.%m.%d-%H.%M`-alpha" +# prepare build command +readonly CMD="./build.sh -v -E $EDITION -T $TARGET $TALKING $CACHE -V $VERSION $*" + + +# sanity checks ((`id -u`)) && echo "This script must be run with root privileges." && exit + # cleanup in case of previous aborted run while pids=$(pidof ./rebuild.sh || pidof sudo ./rebuild.sh) && pids=${pids/$PPID/} && [ "$pids" ] do for pid in ${pids/$PPID/} ; do sudo kill -9 $pid ; done ; sleep 1 ; @@ -34,6 +40,8 @@ do declare -a mountpoints=() for mountpoint in ${mountpoints[@]} ; do umount "${mountpoint}" ; done ; done + +# prepare environment if [ "$MODE" == 'wipe' ] then if [ "$PRESERVE_CACHE" == 'true' ] then for arch in i686 x86_64 @@ -69,10 +77,13 @@ then rm work/build.make_customize_root_image_$TARGET \ fi -CMD="./build.sh -v -E $EDITION -T $TARGET $TALKING $CACHE -V $VERSION $*" +# start build if ${CMD} then echo "success" ; rm ./continue.sh 2> /dev/null -else echo -e "failure executing:\n\t${CMD}\ncontinue with:\n\t./continue.sh [args-to-build.sh]" +else echo -e "failure executing:\n\t${CMD}\ncontinue with:\n\t./continue.sh [extra-args-to-build.sh]" echo -e "#!/bin/bash\n\n${CMD} \$*" > ./continue.sh chmod a+x ./continue.sh fi + + +sudo chgrp -R wheel ./root-image/ |