OSDN Git Service

[fix] : Fixed pkgbuild depends (readarray -t)
authorhayao <hayao@fascode.net>
Sun, 8 Aug 2021 12:33:58 +0000 (21:33 +0900)
committerhayao <hayao@fascode.net>
Sun, 8 Aug 2021 12:33:58 +0000 (21:33 +0900)
system/pkgbuild.sh

index a68947b..2d1bbcc 100755 (executable)
@@ -99,8 +99,8 @@ readarray -t pkgbuild_dirs < <(ls "${pkgbuild_dir}" 2> /dev/null)
 if (( "${#pkgbuild_dirs[@]}" != 0 )); then
     for _dir in "${pkgbuild_dirs[@]}"; do
         cd "${_dir}"
-        readarray depends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; printf "%s\n" "${depends[@]}")
-        readarray makedepends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; printf "%s\n" "${makedepends[@]}")
+        readarray -t depends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; printf "%s\n" "${depends[@]}")
+        readarray -t makedepends < <(source "${pkgbuild_dir}/${_dir}/PKGBUILD"; printf "%s\n" "${makedepends[@]}")
         if (( ${#depends[@]} + ${#makedepends[@]} != 0 )); then
             for _pkg in "${depends[@]}" "${makedepends[@]}"; do
                 if pacman -Ssq "${_pkg}" | grep -x "${_pkg}" 1> /dev/null; then