common/hooks/do-fetch: support 'xbps-uhelper fetch's new '>'-destfile syntax.

This commit is contained in:
Enno Boland 2014-03-12 13:47:57 +01:00
parent 1465bda480
commit b2afcc35be

View file

@ -33,7 +33,8 @@ hook() {
trap - ERR trap - ERR
for f in ${distfiles}; do for f in ${distfiles}; do
curfile=$(basename $f) curfile=$(basename "${f#*>}")
distfile="$srcdir/$curfile" distfile="$srcdir/$curfile"
while true; do while true; do
flock -w 1 ${distfile}.part true flock -w 1 ${distfile}.part true
@ -69,7 +70,7 @@ hook() {
msg_normal "$pkgver: fetching distfile '$curfile'...\n" msg_normal "$pkgver: fetching distfile '$curfile'...\n"
if [ -n "$distfiles" ]; then if [ -n "$distfiles" ]; then
localurl="$f" localurl="${f%>*}"
else else
localurl="$url/$curfile" localurl="$url/$curfile"
fi fi