From cdd129bf708098102d7fde5795b102a2fcc03329 Mon Sep 17 00:00:00 2001 From: hayao Date: Tue, 7 Apr 2020 13:03:12 +0900 Subject: [PATCH] [update] : Os name can be passed to script --- build.sh | 3 ++- channels/plasma/airootfs/root/customize_airootfs.sh | 4 +++- channels/plasma/airootfs/root/customize_airootfs_plasma.sh | 4 +++- channels/share/airootfs/root/customize_airootfs.sh | 4 +++- channels/xfce/airootfs/root/customize_airootfs.sh | 4 +++- channels/xfce/airootfs/root/customize_airootfs_xfce.sh | 4 +++- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 20a06dcd..5bcf26e3 100755 --- a/build.sh +++ b/build.sh @@ -337,6 +337,7 @@ make_customize_airootfs() { # -t : Set plymouth theme. # -j : Enable Japanese. # -k : Set kernel name. + # -o : Set os name. # -u : Set live user name. # -x : Enable debug mode. # -r : Enable rebuild. @@ -363,7 +364,7 @@ make_customize_airootfs() { addition_options="${addition_options} -r" fi - share_options="-p ${password} -k ${kernel} -u ${username}" + share_options="-p '${password}' -k '${kernel}' -u '${username}' -o '${os_name}'" # X permission diff --git a/channels/plasma/airootfs/root/customize_airootfs.sh b/channels/plasma/airootfs/root/customize_airootfs.sh index 7cb94694..bac7e556 100755 --- a/channels/plasma/airootfs/root/customize_airootfs.sh +++ b/channels/plasma/airootfs/root/customize_airootfs.sh @@ -19,10 +19,11 @@ theme_name=alter-logo rebuild=false japanese=false username='alter' +os_name="Alter Linux" # Parse arguments -while getopts 'p:bt:k:rxju:' arg; do +while getopts 'p:bt:k:rxju:o:' arg; do case "${arg}" in p) password="${OPTARG}" ;; b) boot_splash=true ;; @@ -31,6 +32,7 @@ while getopts 'p:bt:k:rxju:' arg; do r) rebuild=true ;; j) japanese=true;; u) username="${OPTARG}" ;; + o) os_name="${OPTARG}" ;; x) set -xv ;; esac done diff --git a/channels/plasma/airootfs/root/customize_airootfs_plasma.sh b/channels/plasma/airootfs/root/customize_airootfs_plasma.sh index 11ac966b..88eb338a 100755 --- a/channels/plasma/airootfs/root/customize_airootfs_plasma.sh +++ b/channels/plasma/airootfs/root/customize_airootfs_plasma.sh @@ -12,10 +12,11 @@ theme_name=alter-logo rebuild=false japanese=false username='alter' +os_name="Alter Linux" # Parse arguments -while getopts 'p:bt:k:rxju:' arg; do +while getopts 'p:bt:k:rxju:o:' arg; do case "${arg}" in p) password="${OPTARG}" ;; b) boot_splash=true ;; @@ -24,6 +25,7 @@ while getopts 'p:bt:k:rxju:' arg; do r) rebuild=true ;; j) japanese=true;; u) username="${OPTARG}" ;; + o) os_name="${OPTARG}" ;; x) set -xv ;; esac done diff --git a/channels/share/airootfs/root/customize_airootfs.sh b/channels/share/airootfs/root/customize_airootfs.sh index d499d485..4fe58873 100755 --- a/channels/share/airootfs/root/customize_airootfs.sh +++ b/channels/share/airootfs/root/customize_airootfs.sh @@ -19,10 +19,11 @@ theme_name=alter-logo rebuild=false japanese=false username='alter' +os_name="Alter Linux" # Parse arguments -while getopts 'p:bt:k:rxju:' arg; do +while getopts 'p:bt:k:rxju:o:' arg; do case "${arg}" in p) password="${OPTARG}" ;; b) boot_splash=true ;; @@ -31,6 +32,7 @@ while getopts 'p:bt:k:rxju:' arg; do r) rebuild=true ;; j) japanese=true;; u) username="${OPTARG}" ;; + o) os_name="${OPTARG}" ;; x) set -xv ;; esac done diff --git a/channels/xfce/airootfs/root/customize_airootfs.sh b/channels/xfce/airootfs/root/customize_airootfs.sh index 10191945..19b5d7e6 100755 --- a/channels/xfce/airootfs/root/customize_airootfs.sh +++ b/channels/xfce/airootfs/root/customize_airootfs.sh @@ -19,10 +19,11 @@ theme_name=alter-logo rebuild=false japanese=false username='alter' +os_name="Alter Linux" # Parse arguments -while getopts 'p:bt:k:rxju:' arg; do +while getopts 'p:bt:k:rxju:o:' arg; do case "${arg}" in p) password="${OPTARG}" ;; b) boot_splash=true ;; @@ -31,6 +32,7 @@ while getopts 'p:bt:k:rxju:' arg; do r) rebuild=true ;; j) japanese=true;; u) username="${OPTARG}" ;; + o) os_name="${OPTARG}" ;; x) set -xv ;; esac done diff --git a/channels/xfce/airootfs/root/customize_airootfs_xfce.sh b/channels/xfce/airootfs/root/customize_airootfs_xfce.sh index 2b7ef00a..87320f1c 100755 --- a/channels/xfce/airootfs/root/customize_airootfs_xfce.sh +++ b/channels/xfce/airootfs/root/customize_airootfs_xfce.sh @@ -19,10 +19,11 @@ theme_name=alter-logo rebuild=false japanese=false username='alter' +os_name="Alter Linux" # Parse arguments -while getopts 'p:bt:k:rxju:' arg; do +while getopts 'p:bt:k:rxju:o:' arg; do case "${arg}" in p) password="${OPTARG}" ;; b) boot_splash=true ;; @@ -31,6 +32,7 @@ while getopts 'p:bt:k:rxju:' arg; do r) rebuild=true ;; j) japanese=true;; u) username="${OPTARG}" ;; + o) os_name="${OPTARG}" ;; x) set -xv ;; esac done -- 2.11.0