Fix 'xbps-src -u fetch' if distfiles already exist.

--HG--
extra : convert_revision : 4e85b3f14dc4c8f887d79cc1d3ab2d7813ced637
This commit is contained in:
Juan RP 2009-04-03 20:30:33 +02:00
parent dfeb2f4143
commit a083feb8ff

View file

@ -71,9 +71,15 @@ fetch_distfiles()
#
[ "$build_style" = "meta-template" ] && return 0
cd $XBPS_SRCDISTDIR
for f in ${distfiles}; do
curfile=$(basename $f)
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
if [ -n "$upcksum" ]; then
fetch_update_cksum $curfile
run_template $pkgname
fi
for i in ${checksum}; do
if [ $dfcount -eq $ckcount -a -n $i ]; then
cksum=$i
@ -105,8 +111,7 @@ fetch_distfiles()
localurl="$url/$curfile"
fi
cd $XBPS_SRCDISTDIR && $fetch_cmd $localurl
$fetch_cmd $localurl
if [ $? -ne 0 ]; then
unset localurl
if [ ! -f $XBPS_SRCDISTDIR/$curfile ]; then
@ -118,8 +123,8 @@ fetch_distfiles()
unset localurl
if [ -n "$upcksum" ]; then
fetch_update_cksum $f
break
fetch_update_cksum $curfile
run_template $pkgname
fi
#