hooks/do-fetch/00-distfiles.sh: use fetch_cmd instead of XBPS_FETCH_CMD

This commit is contained in:
maxice8 2019-01-21 10:12:26 -02:00 committed by maxice8
parent 202b6a7b97
commit 07c2dc7131

View file

@ -182,10 +182,10 @@ try_mirrors() {
mirror="$mirror/$subdir"
fi
msg_normal "$pkgver: fetching distfile '$curfile' from '$mirror'...\n"
$XBPS_FETCH_CMD "$mirror/$curfile"
$fetch_cmd "$mirror/$curfile"
# If basefile was not found, but a curfile file may exist, try to fetch it
if [ ! -f "$distfile" -a "$basefile" != "$curfile" ]; then
$XBPS_FETCH_CMD "$mirror/$basefile"
$fetch_cmd "$mirror/$basefile"
fi
[ ! -f "$distfile" ] && continue
flock -n ${distfile}.part rm -f ${distfile}.part
@ -259,7 +259,7 @@ hook() {
# If distfile does not exist, download it from the original location.
if [ ! -f "$distfile" ]; then
msg_normal "$pkgver: fetching distfile '$curfile'...\n"
flock "${distfile}.part" $XBPS_FETCH_CMD "$f"
flock "${distfile}.part" $fetch_cmd "$f"
fi
if [ ! -f "$distfile" ]; then
msg_error "$pkgver: failed to fetch $curfile.\n"