@@ -63,16 +63,14 @@ _usage () {
6363 echo " -c <comp_type> Set SquashFS compression type (gzip, lzma, lzo, xz, zstd)"
6464 echo " Default: ${sfs_comp} "
6565 echo " -g <gpg_key> Set gpg key"
66- if [[ -z " ${gpg_key} " ]]; then
67- echo " Default: empty"
68- else
69- echo " Default: ${gpg_key} "
70- fi
66+ echo " Default: ${gpg_key} "
7167 echo " -j Enable Japanese mode."
68+ echo " Default: disable"
7269 echo " -k <kernel> Set special kernel type."
7370 echo " core means normal linux kernel"
7471 echo " Default: ${kernel} "
7572 echo " -l Enable post-build cleaning."
73+ echo " Default: disable"
7674 echo " -o <out_dir> Set the output directory"
7775 echo " Default: ${out_dir} "
7876 echo " -p <password> Set a live user password"
@@ -83,15 +81,34 @@ _usage () {
8381 echo " Default: ${username} "
8482 echo " -w <work_dir> Set the working directory"
8583 echo " Default: ${work_dir} "
86- echo " -h This help message"
8784 echo " -x Enable debug mode."
85+ echo " Default: disable"
86+ echo " -h This help message and exit."
87+ echo
88+
89+ for i in $( ls -l " ${script_path} " /channels/ | awk ' $1 ~ /d/ {print $9 }' ) ; do
90+ if [[ -n $( ls " ${script_path} " /channels/${i} ) ]] && [[ ! ${i} = " share" ]]; then
91+ channel_list=" ${channel_list[@]} ${i} "
92+ fi
93+ done
94+
95+ echo " You can switch between installed packages, files included in images, etc. by channel."
8896 echo
89- echo " You can switch the packages to be installed on the channel."
9097 echo " Channel:"
91- echo " arch AlterLinux with a minimal GUI. "
92- echo " You can install a minimal CLI ArchLinux with Calamares."
93- echo " xfce Use Xfce4 for desktop environment."
94- echo " plasma Uses KDE and Qt software."
98+
99+ for _channel in ${channel_list[@]} ; do
100+ if [[ -f " ${script_path} /channels/${_channel} /description.txt" ]]; then
101+ description=$( cat " ${script_path} /channels/${_channel} /description.txt" )
102+ else
103+ description=" This channel does not have a description.txt."
104+ fi
105+ echo -ne " ${_channel} "
106+ for i in $( seq 1 $(( 19 - ${# _channel} )) ) ; do
107+ echo -ne " "
108+ done
109+ echo -ne " ${description} \n"
110+ done
111+
95112
96113 exit " ${1} "
97114}
@@ -102,7 +119,7 @@ check_bool() {
102119 local
103120 case $( eval echo ' $' ${1} ) in
104121 true | false) : ;;
105- * ) echo " The value ${boot_splash} set is invalid" >&2 ;;
122+ * ) echo " The value ${boot_splash} set is invalid" >&2 ; exit 1; ;
106123 esac
107124}
108125
@@ -118,6 +135,8 @@ run_once() {
118135 if [[ ! -e " ${work_dir} /build.${1} " ]]; then
119136 " $1 "
120137 touch " ${work_dir} /build.${1} "
138+ else
139+ echo " Skipped because ${1} has already been executed."
121140 fi
122141}
123142
@@ -351,7 +370,6 @@ make_customize_airootfs() {
351370 -D " ${install_dir} " \
352371 -r " /root/customize_airootfs.sh ${share_options} " \
353372 run
354-
355373 if [[ -f " ${work_dir} /x86_64/airootfs/root/customize_airootfs_${channel_name} .sh" ]]; then
356374 ${mkalteriso} ${mkalteriso_option} \
357375 -w " ${work_dir} /x86_64" \
@@ -428,7 +446,6 @@ make_boot() {
428446 else
429447 cp " ${work_dir} /x86_64/airootfs/boot/vmlinuz-linux" " ${work_dir} /iso/${install_dir} /boot/x86_64/vmlinuz"
430448 fi
431-
432449}
433450
434451# Add other aditional/extra files to ${install_dir}/boot/
@@ -474,7 +491,11 @@ make_syslinux() {
474491 " ${script_path} /syslinux/sys/archiso_sys-${kernel} .cfg" > " ${work_dir} /iso/${install_dir} /boot/syslinux/archiso_sys.cfg"
475492 fi
476493
477- cp " ${script_path} /syslinux/splash.png" " ${work_dir} /iso/${install_dir} /boot/syslinux"
494+ if [[ -f " ${script_path} /channels/${channel_name} /splash.png" ]]; then
495+ cp " ${script_path} /channels/${channel_name} /splash.png" " ${work_dir} /iso/${install_dir} /boot/syslinux"
496+ else
497+ cp " ${script_path} /syslinux/splash.png" " ${work_dir} /iso/${install_dir} /boot/syslinux"
498+ fi
478499 cp " ${work_dir} " /x86_64/airootfs/usr/lib/syslinux/bios/* .c32 " ${work_dir} /iso/${install_dir} /boot/syslinux"
479500 cp " ${work_dir} /x86_64/airootfs/usr/lib/syslinux/bios/lpxelinux.0" " ${work_dir} /iso/${install_dir} /boot/syslinux"
480501 cp " ${work_dir} /x86_64/airootfs/usr/lib/syslinux/bios/memdisk" " ${work_dir} /iso/${install_dir} /boot/syslinux"
711732set -eu
712733
713734
735+ # If there is pacman.conf for each channel, use that for building
736+ [[ -f " ${script_path} /channels/${channel_name} /pacman.conf" ]] && build_pacman_conf=" ${script_path} /channels/${channel_name} /pacman.conf"
737+
738+
739+ # If there is config for each channel. load that.
740+ [[ -f " ${script_path} /channels/${channel_name} /config" ]] && source " ${script_path} /channels/${channel_name} /config"
741+
742+
714743# Create a working directory.
715744[[ ! -d " ${work_dir} " ]] && mkdir -p " ${work_dir} "
716745
0 commit comments