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>
This commit is contained in:
Allan McRae 2013-03-27 20:11:21 +10:00
parent 3f00a03db4
commit a6291858cc

View file

@ -749,12 +749,11 @@ download_sources() {
GET_VCS=0 GET_VCS=0
fi fi
pushd "$SRCDEST" &>/dev/null
local netfile local netfile
for netfile in "${source[@]}"; do for netfile in "${source[@]}"; do
local proto=$(get_protocol "$netfile") pushd "$SRCDEST" &>/dev/null
local proto=$(get_protocol "$netfile")
case "$proto" in case "$proto" in
local) local)
download_local "$netfile" download_local "$netfile"
@ -775,9 +774,9 @@ download_sources() {
download_file "$netfile" download_file "$netfile"
;; ;;
esac esac
done
popd &>/dev/null popd &>/dev/null
done
} }
# Automatically update pkgver variable if a pkgver() function is provided # Automatically update pkgver variable if a pkgver() function is provided