OSDN Git Service

[update] : script arg for alteriso3
authorhayao <shun819.mail@gmail.com>
Fri, 24 Jul 2020 11:23:20 +0000 (20:23 +0900)
committerhayao <shun819.mail@gmail.com>
Fri, 24 Jul 2020 11:23:20 +0000 (20:23 +0900)
channels/i3/airootfs.any/root/customize_airootfs_i3.sh

index 872fe01..5b32263 100755 (executable)
@@ -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 <file1> <file2> ...
 function remove () {