summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-05-04 22:30:33 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-05-07 00:25:58 -0400
commitd7e187deb242ec07887b5def7ddf31d58bcb4147 (patch)
tree076ea7d23c46a6a02a915d39412c412ec6889818
parent5a9a08c94ec980178c93449bf8ce830af775a3ac (diff)
housekeeping
-rwxr-xr-xconfigs/profile/build.sh6
-rwxr-xr-xconfigs/profile/rebuild.sh13
-rw-r--r--configs/profile/root-image/etc/skel/.bash_profile6
3 files changed, 15 insertions, 10 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index 4d8e787..6cbf93c 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -18,7 +18,7 @@ data_dir=/usr/share/parabolaiso/data
releng_dir=$(readlink -f ${0%/*})
initcpio_dir=${releng_dir}/../../parabolaiso/initcpio
packages_dir=${releng_dir}/packages
-[ "`which mkparabolaiso 2> /dev/null`" ] || export PATH=$PATH:"${releng_dir}/../../parabolaiso"
+[ "$(which mkparabolaiso 2> /dev/null)" ] || export PATH=$PATH:"${releng_dir}/../../parabolaiso"
# CLI option defaults
iso_arch='x86_64'
@@ -488,7 +488,7 @@ do for arch in ${archs}
done
done
-if ! (($is_done)); then LOG_STEP ${launch_msg}; else LOG_STEP "Nothing to do"; exit; fi;
+if ! (($is_done)); then LOG_STEP "${launch_msg}"; else LOG_STEP "Nothing to do"; exit; fi;
## build ISO ##
@@ -517,7 +517,7 @@ run_once make_syslinux
run_once make_isolinux
# prepare EFI
-if [[ "`echo ${archs} | grep x86_64`" ]]; then
+if [[ "$(echo ${archs} | grep x86_64)" ]]; then
run_once make_efi
run_once make_efiboot
fi
diff --git a/configs/profile/rebuild.sh b/configs/profile/rebuild.sh
index 6f96052..2e3c8e0 100755
--- a/configs/profile/rebuild.sh
+++ b/configs/profile/rebuild.sh
@@ -2,6 +2,7 @@
## rebuild.sh options ##
readonly PRESERVE_CACHE='false' # preserve package cache in 'wipe' mode
+#readonly PRESERVE_CACHE='true' # preserve package cache in 'wipe' mode
readonly MODE='wipe' # total wipe of work dir, optionally preserving package cache
# readonly MODE='rebuild' # full update rebuild preserving work dir
# readonly MODE='tweak' # apply chroot customization tweaks only
@@ -29,8 +30,8 @@ readonly CMD="./build.sh -v -A $TARGET -I $INIT -W $WMDE $TALKING $CACHE -V $VER
# sanity checks
-((`id -u`)) && echo "This script must be run with root privileges." && exit || \
- echo "Preparing (${MODE} mode): ${CMD}"
+(( ! $(id -u) )) && echo "Preparing (${MODE} mode): ${CMD}" || \
+ ! echo "This script must be run with root privileges." || exit 1
# cleanup in case of previous aborted run
@@ -49,7 +50,8 @@ done
# prepare environment
if [ "$MODE" == 'wipe' ]
-then if [ "$PRESERVE_CACHE" == 'true' ]
+then # stash package cache
+ if [ "$PRESERVE_CACHE" == 'true' ]
then for arch in i686 x86_64
do isorepo=$(realpath ./work)/${arch}/root-image/isorepo
cache_dir=$(realpath ./work)/isorepo-${arch}
@@ -59,8 +61,10 @@ then if [ "$PRESERVE_CACHE" == 'true' ]
done
fi
+ # delete work area
rm -rf ./work/${arch} 2> /dev/null
+ # restore package cache
for arch in i686 x86_64
do isorepo=$(realpath ./work)/${arch}/root-image/isorepo
cache_dir=$(realpath ./work)/isorepo-${arch}
@@ -68,7 +72,7 @@ then if [ "$PRESERVE_CACHE" == 'true' ]
if [ "$PRESERVE_CACHE" == 'true' ]
then if [ "$TARGET" == 'dual' -o "$TARGET" == "${arch}" ]
then mkdir -p $isorepo
- mv $cache_dir/* $isorepo/
+ mv $cache_dir/* $isorepo/ 2> /dev/null
rmdir $cache_dir
fi
else rmdir $cache_dir 2> /dev/null
@@ -86,6 +90,7 @@ fi
# start build
+echo "Starting build: ${CMD}"
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 [extra-args-to-build.sh]"
diff --git a/configs/profile/root-image/etc/skel/.bash_profile b/configs/profile/root-image/etc/skel/.bash_profile
index 5fa7530..c308abd 100644
--- a/configs/profile/root-image/etc/skel/.bash_profile
+++ b/configs/profile/root-image/etc/skel/.bash_profile
@@ -7,9 +7,9 @@
# set standard environment
export EDITOR=nano
-export DE='_DESKTOP_SESSION_' # gnome, kde, xfce, lxde, mate
-export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde
-ENABLE_TTS_BRLTTY='_ENABLE_TTS_BRLTTY_' # speech and braille
+export DE='_DESKTOP_SESSION_' # [ 'gnome', 'kde', 'lxde', 'mate', 'xfce' ]
+export DESKTOP_SESSION='_DESKTOP_SESSION_' # [ '', 'lxde' ]
+ENABLE_TTS_BRLTTY='_ENABLE_TTS_BRLTTY_' # [ '', 'true' ] - speech and braille
# set custom environment