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.

This commit is contained in:
chess.griffin 2009-01-08 21:51:55 +00:00
parent 7c86b0aa35
commit 665e7277ea

View file

@ -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