summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-12-27 03:26:24 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2019-12-29 04:24:52 -0500
commit06b07bb6c70addb826179f48d26c6e6c44875240 (patch)
tree06cf41ff13a1c8760d64daaaf8b655dc7e95f411
parent5bb0a829c0fc01d1e536853db180fce64dc303ed (diff)
unify 'target' and 'iso_arch' vars
-rwxr-xr-xconfigs/profile/build.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index efdadce..c6bc66c 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -3,21 +3,19 @@
set -e -u
# misc constants
+readonly ALL_ARCHES='i686 x86_64'
readonly EFI_IMG_KBYTES=40000
readonly LOG_COLOR='\033[01;34m'
readonly ERR_COLOR='\033[00;31m'
readonly END_COLOR='\033[00m'
-# editions
+# edition-specific data
declare -ar VALID_INITS=('openrc' 'systemd')
declare -ar VALID_GUIS=('cli' 'lxde' 'mate')
-
-# edition-specific strings
iso_title="Parabola GNU/Linux-libre Live" # $iso_edition and $iso_version appended
# CLI option defaults
iso_edition="SystemD/CLI"
-archs='i686 x86_64'
iso_arch='dual'
iso_version=$(date +%Y.%m.%d)
iso_label="PARA_$(date +%Y%m)"
@@ -28,7 +26,6 @@ enable_tts_brltty='false'
pacman_conf=${work_dir}/pacman.conf
work_dir=./work
out_dir=./out
-target=''
verbose=''
# computed params, per CLI args
@@ -80,6 +77,7 @@ _usage ()
LOG_STEP() { printf "${LOG_COLOR}%s${END_COLOR}\n" "$(echo -e $*)" ; }
LOG_ERROR() { printf "${ERR_COLOR}%s${END_COLOR}\n" "$(echo -e $*)" ; }
+
# Helper function to run make_*() only one time per architecture.
run_once() {
local buid_stamp="build.${1}_${arch}"
@@ -384,7 +382,7 @@ make_iso() {
while getopts 'E:T:V:L:D:OSC:w:o:vh' arg; do
case "${arg}" in
E) iso_edition="${OPTARG}" ;;
- T) target="${OPTARG}" ;;
+ T) iso_arch="${OPTARG}" ;;
V) iso_version="${OPTARG}" ;;
L) iso_label="${OPTARG}" ;;
D) iso_dirname="${OPTARG}" ;;
@@ -403,13 +401,14 @@ while getopts 'E:T:V:L:D:OSC:w:o:vh' arg; do
done
# set target arch, GRUB title, and ISO filename
-case "${target}" in
+case "${iso_arch}" in
'i686'|'x86_64')
- archs=${target}
- iso_arch=${target}
+ archs=${iso_arch}
launch_msg="Building single-architecture ${iso_edition} ISO for ${archs}"
;;
*)
+ archs=${ALL_ARCHES}
+ iso_arch='dual'
launch_msg="Building multi-architecture ${iso_edition} ISO for ${archs}"
;;
esac