OSDN Git Service

[fix] : Fixed an issue where some dependent packages were not installed.
authorhayao <shun819.mail@gmail.com>
Sun, 27 Sep 2020 08:14:28 +0000 (17:14 +0900)
committerhayao <shun819.mail@gmail.com>
Sun, 27 Sep 2020 08:14:28 +0000 (17:14 +0900)
system/aur_scripts/PKGBUILD_DEPENDS_SANDBOX.sh

index c64d3c8..a88824c 100755 (executable)
@@ -8,16 +8,35 @@
 # Parses PKGBUILD and outputs the dependencies.
 #
 
-set -e -u
+#set -e -u
+
 cd "$(dirname $0)"
+
+msg_error() {
+    echo -e "${@}" >&2
+}
+
 if [[ 2 -gt $# ]];then
-    echo "missing pkgbuild name or arch-pkgbuild-parser"
+    msg_error "missing pkgbuild name or arch-pkgbuild-parser"
     exit 1
 fi
+
 source "/etc/makepkg.conf"
 
-data_result=`${1} -m -p ${2}`
+parser="${1}"
+pkgbuild="${2}"
+
+if [[ ! -f "${1}" || ! -f "${2}" ]]; then
+    msg_error "The specified file does not exist."
+    exit 1
+fi
+
+data_result=$(${1} -m -p ${2})
 eval ${data_result}
+
+data_result=$(${1} -p ${2})
+eval ${data_result}
+
 for pkg in ${makedepends[@]} ${depends[@]}; do
     echo "${pkg}" | cut -d '>' -f1 | cut -d '=' -f1
 done