From: hayao Date: Fri, 24 Jul 2020 11:23:20 +0000 (+0900) Subject: [update] : script arg for alteriso3 X-Git-Tag: rc3-alpha1~193^2~69 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3bf1c58cf38378db721d8e6207ebb6c304bfd9a9;p=alterlinux%2Falterlinux.git [update] : script arg for alteriso3 --- diff --git a/channels/i3/airootfs.any/root/customize_airootfs_i3.sh b/channels/i3/airootfs.any/root/customize_airootfs_i3.sh index 872fe01a..5b322639 100755 --- a/channels/i3/airootfs.any/root/customize_airootfs_i3.sh +++ b/channels/i3/airootfs.any/root/customize_airootfs_i3.sh @@ -14,37 +14,49 @@ set -e -u # All values can be changed by arguments. password=alter boot_splash=false -kernel='zen' +kernel_config_line='zen linux-zen linux-zen-beaders vmlinuz-linux-zen linux-zen' theme_name=alter-logo rebuild=false -japanese=false username='alter' os_name="Alter Linux" install_dir="alter" usershell="/bin/bash" -debug=true +debug=false +timezone="UTC" +localegen="en_US\\.UTF-8\\" +language="en" # Parse arguments -while getopts 'p:bt:k:rxju:o:i:s:da:' arg; do +while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do case "${arg}" in p) password="${OPTARG}" ;; b) boot_splash=true ;; t) theme_name="${OPTARG}" ;; - k) kernel="${OPTARG}" ;; + k) kernel_config_line="${OPTARG}" ;; r) rebuild=true ;; - j) japanese=true;; u) username="${OPTARG}" ;; o) os_name="${OPTARG}" ;; i) install_dir="${OPTARG}" ;; s) usershell="${OPTARG}" ;; d) debug=true ;; x) debug=true; set -xv ;; - a) arch="${OPTARG}" + a) arch="${OPTARG}" ;; + g) localegen="${OPTARG/./\\.}\\" ;; + z) timezone="${OPTARG}" ;; + l) language="${OPTARG}" ;; esac done +# Parse kernel +kernel=$(echo ${kernel_config_line} | awk '{print $1}') +kernel_package=$(echo ${kernel_config_line} | awk '{print $2}') +kernel_headers_packages=$(echo ${kernel_config_line} | awk '{print $3}') +kernel_filename=$(echo ${kernel_config_line} | awk '{print $4}') +kernel_mkinitcpio_profile=$(echo ${kernel_config_line} | awk '{print $5}') + + # Delete file only if file exists # remove ... function remove () {