summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-12-22 21:12:50 -0500
committerAllan McRae <allan@archlinux.org>2016-12-05 15:20:08 +1000
commit0b30edacd4c163b4fa5990d06cca71053248123b (patch)
tree069e5e60be528cbad3a343cd3112505c47097505 /scripts
parent90f1dd165769f3a0e7f7275d3e9c72e902325146 (diff)
downloadpacman-0b30edacd4c163b4fa5990d06cca71053248123b.tar.xz
makepkg: fix quoting in calls to dependency checking
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 0aabc259..c212ffc9 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -243,7 +243,7 @@ handle_deps() {
(( $# == 0 )) && return $R_DEPS_SATISFIED
- local deplist="$*"
+ local deplist=("$@")
if (( ! DEP_BIN )); then
return $R_DEPS_MISSING
@@ -253,7 +253,7 @@ handle_deps() {
# install missing deps from binary packages (using pacman -S)
msg "$(gettext "Installing missing dependencies...")"
- if ! run_pacman -S --asdeps $deplist; then
+ if ! run_pacman -S --asdeps "${deplist[@]}"; then
error "$(gettext "'%s' failed to install missing dependencies.")" "$PACMAN"
exit 1 # TODO: error code
fi
@@ -276,10 +276,10 @@ resolve_deps() {
# deplist cannot be declared like this: local deplist=$(foo)
# Otherwise, the return value will depend on the assignment.
local deplist
- deplist=$(check_deps "$@") || exit 1
+ deplist=($(check_deps "$@")) || exit 1
[[ -z $deplist ]] && return $R_DEPS_SATISFIED
- if handle_deps $deplist; then
+ if handle_deps "${deplist[@]}"; then
# check deps again to make sure they were resolved
deplist=$(check_deps "$@") || exit 1
[[ -z $deplist ]] && return $R_DEPS_SATISFIED