@@ -109,8 +109,7 @@ _usage () {
109109 for _type in " locale" " kernel" ; do
110110 echo " ${_type} for each architecture:"
111111 for _arch in $( find " ${script_path} /system/" -maxdepth 1 -mindepth 1 -name " ${_type} -*" -print0 | xargs -I{} -0 basename {} | sed " s|${_type} -||g" ) ; do
112- echo -n " ${_arch} $( echo_blank " $(( "${blank} " - "${# _arch} " )) " ) "
113- " ${tools_dir} /${_type} .sh" -a " ${_arch} " show
112+ echo " ${_arch} $( echo_blank " $(( "${blank} " - "${# _arch} " )) " ) $( " ${tools_dir} /${_type} .sh" -a " ${_arch} " show) "
114113 done
115114 echo
116115 done
@@ -159,7 +158,7 @@ _usage () {
159158}
160159
161160# Unmount helper Usage: _umount <target>
162- _umount () { if mountpoint -q " ${1} " ; then umount -lf " ${1} " ; fi ; }
161+ _umount () { mountpoint -q " ${1} " && umount -lf " ${1} " ; return 0 ; }
163162
164163# Mount helper Usage: _mount <source> <target>
165164_mount () { ! mountpoint -q " ${2} " && [[ -f " ${1} " ]] && [[ -d " ${2} " ]] && mount " ${1} " " ${2} " ; return 0; }
@@ -181,7 +180,6 @@ mount_airootfs () {
181180
182181# Helper function to run make_*() only one time.
183182run_once () {
184- set -eu
185183 if [[ ! -e " ${lockfile_dir} /build.${1} " ]]; then
186184 msg_debug " Running ${1} ..."
187185 mount_airootfs
@@ -659,10 +657,10 @@ make_customize_airootfs() {
659657 # -k changed in AlterISO3 from passing kernel name to passing kernel configuration.
660658
661659 # Generate options of customize_airootfs.sh.
662- _airootfs_script_options=" -p ' ${password} ' -k ' ${kernel} ${kernel_filename} ${kernel_mkinitcpio_profile} ' -u ' ${username} ' -o ' ${os_name} ' -i ' ${install_dir} ' -s ' ${usershell} ' -a ' ${arch} ' -g ' ${locale_gen_name} ' -l ' ${locale_name} ' -z ' ${locale_time} ' -t ${theme_name} "
663- [[ " ${boot_splash} " = true ]] && _airootfs_script_options= " ${_airootfs_script_options} -b"
664- [[ " ${debug} " = true ]] && _airootfs_script_options= " ${_airootfs_script_options} -d"
665- [[ " ${bash_debug} " = true ]] && _airootfs_script_options= " ${_airootfs_script_options} -x"
660+ _airootfs_script_options=( -p " ${password} " -k " ${kernel} ${kernel_filename} ${kernel_mkinitcpio_profile} " -u " ${username} " -o " ${os_name} " -i " ${install_dir} " -s " ${usershell} " -a " ${arch} " -g " ${locale_gen_name} " -l " ${locale_name} " -z " ${locale_time} " -t " ${theme_name} " )
661+ [[ " ${boot_splash} " = true ]] && _airootfs_script_options+=( " -b" )
662+ [[ " ${debug} " = true ]] && _airootfs_script_options+=( " -d" )
663+ [[ " ${bash_debug} " = true ]] && _airootfs_script_options+=( " -x" )
666664
667665 _main_script=" root/customize_airootfs.sh"
668666
@@ -684,8 +682,8 @@ make_customize_airootfs() {
684682 done
685683
686684 chmod 755 " ${airootfs_dir} /${_main_script} "
687- cp " ${airootfs_dir} /${_main_script} " " ${build_dir} /$( basename ${_main_script} ) "
688- _chroot_run " ${_main_script} ${_airootfs_script_options} "
685+ cp " ${airootfs_dir} /${_main_script} " " ${build_dir} /$( basename " ${_main_script} " ) "
686+ _chroot_run " ${_main_script} " " ${_airootfs_script_options[@] } "
689687 remove " ${airootfs_dir} /${_main_script} "
690688
691689 # /root permission https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59
0 commit comments