summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-03-27 11:11:21 +0100
committerAllan McRae <allan@archlinux.org>2013-03-30 00:06:12 +0100
commita6291858cc1570e56204c4a1e7a68f76c4853336 (patch)
treed85d3b0e2c65e04e9de938b37854e1a6377b0661 /scripts
parent3f00a03db4409a9f19b7ff55e82417d79040327c (diff)
downloadpacman-a6291858cc1570e56204c4a1e7a68f76c4853336.tar.gz
pacman-a6291858cc1570e56204c4a1e7a68f76c4853336.tar.xz
Ensure we are always in $SRCDEST before downloading
When VCS sources were updated, we changed into their root directory. Any following source was then downloaded to an incorrect place causing a failure in makepkg. Ensure we are always in the $SRCDEST directory before starting any download. Fixes FS#34488. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index f9e0f957..45be8b63 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -749,12 +749,11 @@ download_sources() {
GET_VCS=0
fi
- pushd "$SRCDEST" &>/dev/null
-
local netfile
for netfile in "${source[@]}"; do
- local proto=$(get_protocol "$netfile")
+ pushd "$SRCDEST" &>/dev/null
+ local proto=$(get_protocol "$netfile")
case "$proto" in
local)
download_local "$netfile"
@@ -775,9 +774,9 @@ download_sources() {
download_file "$netfile"
;;
esac
- done
- popd &>/dev/null
+ popd &>/dev/null
+ done
}
# Automatically update pkgver variable if a pkgver() function is provided