packman: use fetch instead of urlget

This commit is contained in:
Ben Gras 2010-07-01 00:10:07 +00:00
parent 47b58b2ebb
commit 0ad4e16985

View File

@ -102,7 +102,7 @@ then echo -n "Update package list from network? (Y/n) "
y=`myread` y=`myread`
if [ "$y" != n -a "$y" != N ] if [ "$y" != n -a "$y" != N ]
then echo "Fetching package list from $LISTURL." then echo "Fetching package list from $LISTURL."
urlget $LISTURL >$TMPF && mv $TMPF $LISTFILE || echo "Update not successful." fetch -o $TMPF $LISTURL && mv $TMPF $LISTFILE || echo "Update not successful."
fi fi
netpackages=$LISTFILE netpackages=$LISTFILE
if [ ! -f "$netpackages" -o ! `cat "$netpackages" 2>/dev/null | wc -l | awk '{ print $1 }'` -gt 1 ] if [ ! -f "$netpackages" -o ! `cat "$netpackages" 2>/dev/null | wc -l | awk '{ print $1 }'` -gt 1 ]
@ -215,7 +215,7 @@ do cd $TMPDIR
case $source in case $source in
net*) echo "Retrieving $packno ($packagename) from primary location into $TMPDIR .." net*) echo "Retrieving $packno ($packagename) from primary location into $TMPDIR .."
srcurl="" srcurl=""
if urlget $URL1/$file >$file if fetch -o $file $URL1/$file
then echo "Retrieved ok. Installing .." then echo "Retrieved ok. Installing .."
packit $file && echo Installed ok. packit $file && echo Installed ok.
srcurl=$SRCURL1/$file srcurl=$SRCURL1/$file
@ -225,7 +225,7 @@ do cd $TMPDIR
then ( cd $SRC || myexit 2 then ( cd $SRC || myexit 2
srcfile=${packagename}-src.tar.bz2 srcfile=${packagename}-src.tar.bz2
echo "Retrieving source from $srcurl .." echo "Retrieving source from $srcurl .."
urlget $srcurl >$srcfile || myexit 3 fetch -o $srcfile $srcurl || myexit 3
echo "Source retrieved in $SRC/$srcfile." echo "Source retrieved in $SRC/$srcfile."
$BUNZIP2 -dc $srcfile | tar xf - >/dev/null || myexit 3 $BUNZIP2 -dc $srcfile | tar xf - >/dev/null || myexit 3
echo "Source unpacked in $SRC." echo "Source unpacked in $SRC."