r756 - /scripts/download-seti
smoe-guest at users.alioth.debian.org
smoe-guest at users.alioth.debian.org
Thu Nov 22 13:14:30 UTC 2007
Author: smoe-guest
Date: Thu Nov 22 13:14:30 2007
New Revision: 756
URL: http://svn.debian.org/wsvn/pkg-boinc/?sc=1&rev=756
Log:
Checking for local presence of target file prior to download.
Modified:
scripts/download-seti
Modified: scripts/download-seti
URL: http://svn.debian.org/wsvn/pkg-boinc/scripts/download-seti?rev=756&op=diff
==============================================================================
--- scripts/download-seti (original)
+++ scripts/download-seti Thu Nov 22 13:14:30 2007
@@ -16,22 +16,41 @@
NIGHTLY_DIR="http://setiweb.ssl.berkeley.edu/sah/seti_source/nightly"
FILENAME="setiathome_enhanced-client-cvs-$DATE.tar.gz"
-if ! curl --fail "$NIGHTLY_DIR/$FILENAME" -o "$FILENAME"; then
- echo "Could not download the file '$NIGHTLY_DIR/$FILENAME', now searching in the subdir 'old'."
- if ! curl --fail "$NIGHTLY_DIR/old/$FILENAME" -o "$FILENAME"; then
- echo "Also failed to download '$NIGHTLY_DIR/old/$FILENAME'."
- exit -1
+date=`echo $DATE | tr -d "-"`
+
+if which egrep; then
+ f=`ls . | egrep "boinc-app-seti_.*+cvs$date.orig.tar.gz\$"| tr -d '\n'`
+ if [ -n "$f" ]; then
+ echo "The file '$f' was already found in the local directory. No additional download performed."
+ exit 0
fi
fi
-echo "The download of release $DATE was successful."
+if [ -r $FILENAME ]; then
+ echo "The download is spared since the file '$FILENAME' is already existing locally."
+ echo "The preparation of upstream's source for the needs of Debian is still being performed."
+else
+ if ! curl --fail "$NIGHTLY_DIR/$FILENAME" -o "$FILENAME"; then
+ echo "Could not download the file '$NIGHTLY_DIR/$FILENAME', now searching in the subdir 'old'."
+ if ! curl --fail "$NIGHTLY_DIR/old/$FILENAME" -o "$FILENAME"; then
+ echo "Also failed to download '$NIGHTLY_DIR/old/$FILENAME'."
+ exit -1
+ fi
+ fi
+ echo "The download of release $DATE was successful."
+fi
-tar -xzf "$FILENAME"
+
+if ! tar xzf "$FILENAME"; then
+ echo "The downloaded file '$FILENAME' could not be unpacked, a faulty download is a likely cause. Please manually 'rm $FILENAME' and try again."
+ exit -1
+fi
+
rm "$FILENAME"
CFG_AC="seti_boinc/configure.ac"
VERSION="`grep AC_INIT $CFG_AC | cut -d ',' -f 2 | sed 's/\s*//g'`"
-DEBIAN_VERSION="$VERSION+cvs`echo $DATE | sed 's/-//g'`"
+DEBIAN_VERSION="$VERSION+cvs$date"
# remove non-free or unneeded things
rm -rf seti_boinc/jpeglib
More information about the pkg-boinc-commits
mailing list