From 321db4ea8292b6c8575e4e2d06c22f411acf4ce5 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 27 Dec 2019 03:26:24 -0500 Subject: unify 'target' and 'iso_arch' vars --- configs/profile/build.sh | 17 ++++++++--------- 1 file 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 -- cgit v1.2.2