From 9eec9fd322704880a2eea6c4a9c6597d19461ca6 Mon Sep 17 00:00:00 2001 From: hayao Date: Sun, 12 Jul 2020 11:43:58 +0900 Subject: [PATCH] [change] : changed script arg --- .../lxde/airootfs.any/root/customize_airootfs_lxde.sh | 12 ++++++++++-- .../airootfs.any/root/customize_airootfs_plasma.sh | 19 +++++++++++++++++-- .../releng/airootfs.any/root/customize_airootfs.sh | 12 ++++++++++-- .../share/airootfs.any/root/customize_airootfs.sh | 12 ++++++++++-- .../xfce/airootfs.any/root/customize_airootfs_xfce.sh | 12 ++++++++++-- 5 files changed, 57 insertions(+), 10 deletions(-) diff --git a/channels/lxde/airootfs.any/root/customize_airootfs_lxde.sh b/channels/lxde/airootfs.any/root/customize_airootfs_lxde.sh index 4ef4d0b6..9a25adb5 100755 --- a/channels/lxde/airootfs.any/root/customize_airootfs_lxde.sh +++ b/channels/lxde/airootfs.any/root/customize_airootfs_lxde.sh @@ -14,7 +14,7 @@ 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 username='alter' @@ -33,7 +33,7 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do p) password="${OPTARG}" ;; b) boot_splash=true ;; t) theme_name="${OPTARG}" ;; - k) kernel="${OPTARG}" ;; + k) kernel_config_line="${OPTARG}" ;; r) rebuild=true ;; u) username="${OPTARG}" ;; o) os_name="${OPTARG}" ;; @@ -49,6 +49,14 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do 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 () { diff --git a/channels/plasma/airootfs.any/root/customize_airootfs_plasma.sh b/channels/plasma/airootfs.any/root/customize_airootfs_plasma.sh index 27b818e1..cd94a37d 100755 --- a/channels/plasma/airootfs.any/root/customize_airootfs_plasma.sh +++ b/channels/plasma/airootfs.any/root/customize_airootfs_plasma.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +# +# Yamada Hayao +# Twitter: @Hayao0819 +# Email : hayao@fascode.net +# +# (c) 2019-2020 Fascode Network. +# set -e -u @@ -7,7 +14,7 @@ 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 username='alter' @@ -26,7 +33,7 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do p) password="${OPTARG}" ;; b) boot_splash=true ;; t) theme_name="${OPTARG}" ;; - k) kernel="${OPTARG}" ;; + k) kernel_config_line="${OPTARG}" ;; r) rebuild=true ;; u) username="${OPTARG}" ;; o) os_name="${OPTARG}" ;; @@ -42,6 +49,14 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do 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 () { diff --git a/channels/releng/airootfs.any/root/customize_airootfs.sh b/channels/releng/airootfs.any/root/customize_airootfs.sh index b8bee6ec..99c11878 100755 --- a/channels/releng/airootfs.any/root/customize_airootfs.sh +++ b/channels/releng/airootfs.any/root/customize_airootfs.sh @@ -14,7 +14,7 @@ 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 username='alter' @@ -33,7 +33,7 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do p) password="${OPTARG}" ;; b) boot_splash=true ;; t) theme_name="${OPTARG}" ;; - k) kernel="${OPTARG}" ;; + k) kernel_config_line="${OPTARG}" ;; r) rebuild=true ;; u) username="${OPTARG}" ;; o) os_name="${OPTARG}" ;; @@ -49,6 +49,14 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do 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 () { diff --git a/channels/share/airootfs.any/root/customize_airootfs.sh b/channels/share/airootfs.any/root/customize_airootfs.sh index 9b69b21a..ff403855 100755 --- a/channels/share/airootfs.any/root/customize_airootfs.sh +++ b/channels/share/airootfs.any/root/customize_airootfs.sh @@ -14,7 +14,7 @@ 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 username='alter' @@ -33,7 +33,7 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do p) password="${OPTARG}" ;; b) boot_splash=true ;; t) theme_name="${OPTARG}" ;; - k) kernel="${OPTARG}" ;; + k) kernel_config_line="${OPTARG}" ;; r) rebuild=true ;; u) username="${OPTARG}" ;; o) os_name="${OPTARG}" ;; @@ -49,6 +49,14 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do 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}') + + # Check whether true or false is assigned to the variable. function check_bool() { local diff --git a/channels/xfce/airootfs.any/root/customize_airootfs_xfce.sh b/channels/xfce/airootfs.any/root/customize_airootfs_xfce.sh index 730b8887..db69decd 100755 --- a/channels/xfce/airootfs.any/root/customize_airootfs_xfce.sh +++ b/channels/xfce/airootfs.any/root/customize_airootfs_xfce.sh @@ -14,7 +14,7 @@ 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 username='alter' @@ -33,7 +33,7 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do p) password="${OPTARG}" ;; b) boot_splash=true ;; t) theme_name="${OPTARG}" ;; - k) kernel="${OPTARG}" ;; + k) kernel_config_line="${OPTARG}" ;; r) rebuild=true ;; u) username="${OPTARG}" ;; o) os_name="${OPTARG}" ;; @@ -49,6 +49,14 @@ while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do 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 () { -- 2.11.0