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-10 20:35:33 -0400
commit95273f7000a1041ff3a83ecb04a7c0a969e6c0c4 (patch)
tree3d1e472cadcef1af551d2533979e19884657016f
parent0c3b7a1d73594387e575767248239eed5df3db60 (diff)
housekeeping
-rwxr-xr-xconfigs/profile/build.sh6
-rwxr-xr-xconfigs/profile/rebuild.sh13
-rw-r--r--configs/profile/root-image/etc/skel/.bash_profile21
3 files changed, 23 insertions, 17 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 75b9903..dc8c7c7 100644
--- a/configs/profile/root-image/etc/skel/.bash_profile
+++ b/configs/profile/root-image/etc/skel/.bash_profile
@@ -8,19 +8,20 @@ IS_INITIAL_TTY=$( [[ -z "$DISPLAY" && "$(tty)" = /dev/tty1 ]] && echo 1 || echo
# set standard environment
export EDITOR=nano
-export DE='_DESKTOP_SESSION_' # gnome , kde , xfce , lxde , mate
-export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde , mini , ''
-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
# customize environment
-INSTALL_WIZARD_STATE_FILE=/var/lib/parabola-install-wizard/.session_state
-INSTALL_WIZARD_INIT_FILE=/usr/lib/parabola-install-wizard/session-init.sh
+SESSION_STATE_FILE=/var/lib/parabola-install-wizard/.session_state
+SESSION_INIT_SCRIPT=/usr/lib/parabola-install-wizard/session-init.sh
+INSTALL_WIZARD_SCRIPT=/usr/lib/parabola-install-wizard/install.sh
sudo /root/.remote-script.sh
-sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' ${INSTALL_WIZARD_STATE_FILE}
-(( $IS_INITIAL_TTY )) && sudo ${INSTALL_WIZARD_INIT_FILE}
-Session=$(grep 'SESSION=' ${INSTALL_WIZARD_STATE_FILE} | cut -d '=' -f 2)
-sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' ${INSTALL_WIZARD_STATE_FILE}
+sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' ${SESSION_STATE_FILE}
+(( $IS_INITIAL_TTY )) && sudo ${SESSION_INIT_SCRIPT}
+Session=$(grep 'SESSION=' ${SESSION_STATE_FILE} | cut -d '=' -f 2)
+sed -i 's|^SESSION=.*|SESSION=_UNDEFINED_|' ${SESSION_STATE_FILE}
export $(cat /etc/locale.conf)
@@ -35,7 +36,7 @@ case ${Session} in
exec startx
;;
'wizard')
- sudo /root/.session/install/install.sh
+ sudo ${INSTALL_WIZARD_SCRIPT}
;;
*)
cat /etc/motd