OSDN Git Service

[update] : Support customize_airootfs without .add
authorhayao <shun819.mail@gmail.com>
Mon, 13 Apr 2020 02:18:44 +0000 (11:18 +0900)
committerhayao <shun819.mail@gmail.com>
Mon, 13 Apr 2020 02:18:44 +0000 (11:18 +0900)
build.sh

index 9a0a36e..c3f53b0 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -416,9 +416,10 @@ make_customize_airootfs() {
     chmod 755 "${work_dir}/x86_64/airootfs/root/customize_airootfs.sh"
     if [[ -f "${work_dir}/x86_64/airootfs/root/customize_airootfs_${channel_name}.sh" ]]; then
         chmod 755 "${work_dir}/x86_64/airootfs/root/customize_airootfs_${channel_name}.sh"
+    elif [[ -f "${work_dir}/x86_64/airootfs/root/customize_airootfs_$(echo ${channel_name} | sed 's/\.[^\.]*$//').sh" ]]; then
+        chmod 755 "${work_dir}/x86_64/airootfs/root/customize_airootfs_$(echo ${channel_name} | sed 's/\.[^\.]*$//').sh"
     fi
 
-
     # Execute customize_airootfs.sh.
     if [[ -z ${addition_options} ]]; then
         ${mkalteriso} ${mkalteriso_option} \
@@ -434,6 +435,13 @@ make_customize_airootfs() {
             -D "${install_dir}" \
             -r "/root/customize_airootfs_${channel_name}.sh ${share_options}" \
             run
+        elif [[ -f "${work_dir}/x86_64/airootfs/root/customize_airootfs_$(echo ${channel_name} | sed 's/\.[^\.]*$//').sh" ]]; then
+            ${mkalteriso} ${mkalteriso_option} \
+            -w "${work_dir}/x86_64" \
+            -C "${work_dir}/pacman.conf" \
+            -D "${install_dir}" \
+            -r "/root/customize_airootfs_$(echo ${channel_name} | sed 's/\.[^\.]*$//').sh ${share_options}" \
+            run
         fi
     else
         ${mkalteriso} ${mkalteriso_option} \
@@ -450,6 +458,13 @@ make_customize_airootfs() {
             -D "${install_dir}" \
             -r "/root/customize_airootfs_${channel_name}.sh ${share_options} ${addition_options}" \
             run
+        elif [[ -f "${work_dir}/x86_64/airootfs/root/customize_airootfs_$(echo ${channel_name} | sed 's/\.[^\.]*$//').sh" ]]; then
+            ${mkalteriso} ${mkalteriso_option} \
+            -w "${work_dir}/x86_64" \
+            -C "${work_dir}/pacman.conf" \
+            -D "${install_dir}" \
+            -r "/root/customize_airootfs_$(echo ${channel_name} | sed 's/\.[^\.]*$//').sh ${share_options} ${addition_options}" \
+            run
         fi
     fi