From 665e7277ea4edfe90fa74809ede0cfbefab85f04 Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Thu, 8 Jan 2009 21:51:55 +0000 Subject: [PATCH] remove the -O option from wget since that was causing a few headaches and potential for more; instead create a temporary SRCDIR/download where the wget occurs and the file is then moved to SRCDIR. I am leaving the older stuff commented out for the time being while this is tested; also remove some cruft. --- src/usr/bin/sbopkg | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index 0e5befe..0193fde 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -1054,18 +1054,19 @@ if [ ! -e $PKGPATH/$SRCNAME ]; then if [ -e $SRCDIR/$SRCNAME ]; then ln -s $SRCDIR/$SRCNAME $LOCALREPO/$SLACKVER/$PKGPATH/$SRCNAME else - cd $SRCDIR - DOWNLOADFILE=$(echo $DOWNLOAD | sed -e 's/^.*\///g;s/\%2B/+/g') - if [ "$PKG" = "django" ]; then - DOWNLOADFILE=$SRCNAME - fi - #wget -c -t 5 -T $TIMEOUT --progress=bar $DOWNLOAD -O $DOWNLOADFILE || rm -rf $TMP/sbopkg_build.lck - # The above line was the old, default code. The line below is - # the new addition to capture PID's, allowing a clean abort - # when a user presses Control-C. - wget $WGETFLAGS $DOWNLOAD -O $DOWNLOADFILE >> $SBOPKGOUTPUT & echo "$!" >> $TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT + mkdir -p $SRCDIR/download + cd $SRCDIR/download + #DOWNLOADFILE=$(echo $DOWNLOAD | sed -e 's/^.*\///g;s/\%2B/+/g') + #if [ "$PKG" = "django" ]; then + # DOWNLOADFILE=$SRCNAME + #fi + #wget $WGETFLAGS $DOWNLOAD -O $DOWNLOADFILE >> $SBOPKGOUTPUT & echo "$!" >> $TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT + wget $WGETFLAGS $DOWNLOAD >> $SBOPKGOUTPUT & echo "$!" >> $TMP/sbopkgpidlist 2>>$SBOPKGOUTPUT wait + DOWNLOADFILE=$(ls *) + mv $DOWNLOADFILE $SRCDIR/ cd - + rm -rf $SRCDIR/download ln -s $SRCDIR/$SRCNAME $LOCALREPO/$SLACKVER/$PKGPATH/$SRCNAME fi fi