OSDN Git Service

[update] : Added exception handling.
authorhayao <shun819.mail@gmail.com>
Mon, 17 Aug 2020 04:23:57 +0000 (13:23 +0900)
committerhayao <shun819.mail@gmail.com>
Mon, 17 Aug 2020 04:23:57 +0000 (13:23 +0900)
build.sh

index 0a2453e..1595e53 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -905,10 +905,12 @@ make_packages_aur() {
     ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}"  -D "${install_dir}" -r "/root/pacls_gen_old.sh" run
 
     # Install dependent packages.
-    local pkgbuild_data
+    local dependent_packages
     for _aur_pkg in ${pkglist_aur[@]}; do
-        pkgbuild_data="$("${script_path}/system/aur_scripts/PKGBUILD_DEPENDS_SANDBOX.sh" "${script_path}/system/arch-pkgbuild-parser" "$(realpath "${work_dir}/${arch}/airootfs/aurbuild_temp/${_aur_pkg}/PKGBUILD")")"
-        ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "${pkgbuild_data}" install
+        dependent_packages="$("${script_path}/system/aur_scripts/PKGBUILD_DEPENDS_SANDBOX.sh" "${script_path}/system/arch-pkgbuild-parser" "$(realpath "${work_dir}/${arch}/airootfs/aurbuild_temp/${_aur_pkg}/PKGBUILD")")"
+        if [[ -n "${dependent_packages}" ]]; then
+            ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "${dependent_packages}" install
+        fi
     done
 
     # Dump packages