OSDN Git Service

[update] : Supported channel config
authorhayao <shun819.mail@gmail.com>
Fri, 18 Sep 2020 09:58:37 +0000 (18:58 +0900)
committerhayao <shun819.mail@gmail.com>
Fri, 18 Sep 2020 09:58:37 +0000 (18:58 +0900)
channels/serene/config.any [new file with mode: 0644]
lubs

diff --git a/channels/serene/config.any b/channels/serene/config.any
new file mode 100644 (file)
index 0000000..fd7e685
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+
+iso_publisher='Fascode Network <https://fascode.net>'
+iso_application="${os_name} Live/Rescue CD"
+iso_name="SereneLinux"
+usershell="/bin/bash"
\ No newline at end of file
diff --git a/lubs b/lubs
index 4e00c96..4552a4f 100755 (executable)
--- a/lubs
+++ b/lubs
@@ -37,7 +37,6 @@ iso_label="${os_name}_${codename}_${arch}"
 iso_publisher='Fascode Network <https://fascode.net>'
 iso_application="${os_name} Live/Rescue CD"
 iso_version="${codename}-$(date +%Y.%m.%d)"
-iso_filename="${iso_name}-${iso_version}-${arch}.iso"
 
 channel_name="serene"
 
@@ -232,11 +231,22 @@ prepare_build() {
     [[ ! -d "${out_dir}" ]] && mkdir -p "${out_dir}"
     umount_chroot
 
+    # Load channel config
+    local _load_config
+    _load_config() {
+        [[ -f "${1}" ]] && source "${1}"
+    }
+    _load_config "${channels_dir}/${channel_name}/config.any"
+    _load_config "${channels_dir}/${channel_name}/config.${arch}"
+
     # Check codename
     if [[ -z $(grep -h -v ^'#' ${channels_dir}/${channel_name}/codename.${arch} | grep -x ${codename}) ]]; then
         _msg_error "This codename (${channel_name}) is not supported on this channel (${codename})."
     fi
 
+    # Set iso file name
+    iso_filename="${iso_name}-${iso_version}-${arch}.iso"
+
 }