OSDN Git Service

[change] : for alteriso2
authorhayao <shun819.mail@gmail.com>
Wed, 22 Jul 2020 09:28:57 +0000 (18:28 +0900)
committerhayao <shun819.mail@gmail.com>
Wed, 22 Jul 2020 09:28:57 +0000 (18:28 +0900)
channels/cinnamon/airootfs.any/root/customize_airootfs_cinnamon.sh

index 84bd8cc..9be8d83 100755 (executable)
@@ -14,49 +14,37 @@ set -e -u
 # All values can be changed by arguments.
 password=alter
 boot_splash=false
-kernel_config_line='zen linux-zen linux-zen-beaders vmlinuz-linux-zen linux-zen'
+kernel='zen'
 theme_name=alter-logo
 rebuild=false
+japanese=false
 username='alter'
 os_name="Alter Linux"
 install_dir="alter"
 usershell="/bin/bash"
-debug=false
-timezone="UTC"
-localegen="en_US\\.UTF-8\\"
-language="en"
+debug=true
 
 
 # Parse arguments
-while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
+while getopts 'p:bt:k:rxju:o:i:s:da:' arg; do
     case "${arg}" in
         p) password="${OPTARG}" ;;
         b) boot_splash=true ;;
         t) theme_name="${OPTARG}" ;;
-        k) kernel_config_line="${OPTARG}" ;;
+        k) kernel="${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}" ;;
-        g) localegen="${OPTARG/./\\.}\\" ;;
-        z) timezone="${OPTARG}" ;;
-        l) language="${OPTARG}" ;;
+        a) arch="${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 () {
@@ -104,7 +92,7 @@ systemctl enable firewalld.service
 
 
 # Replace link
-if [[ "${language}" = "ja" ]]; then
+if [[ "${japanese}" = true ]]; then
     remove "/etc/skel/Desktop/welcome-to-alter.desktop"
     remove "/home/${username}/Desktop/welcome-to-alter.desktop"