r5247 - in packages/trunk/warsow/debian: . scripts
Andres Mejia
ceros-guest at alioth.debian.org
Sun Jan 6 17:40:44 UTC 2008
Author: ceros-guest
Date: 2008-01-06 17:40:44 +0000 (Sun, 06 Jan 2008)
New Revision: 5247
Added:
packages/trunk/warsow/debian/warsow-get-orig-source
Removed:
packages/trunk/warsow/debian/scripts/warsow-tarball.sh
Log:
Moved debian/scripts/warsow-tarball.sh to debian/warsow-get-orig-source. Modified script to try some mirrors to get upstream source.
Deleted: packages/trunk/warsow/debian/scripts/warsow-tarball.sh
===================================================================
--- packages/trunk/warsow/debian/scripts/warsow-tarball.sh 2008-01-06 16:52:06 UTC (rev 5246)
+++ packages/trunk/warsow/debian/scripts/warsow-tarball.sh 2008-01-06 17:40:44 UTC (rev 5247)
@@ -1,91 +0,0 @@
-#! /bin/sh
-
-# This script will download the upstream tarball that contains the content of
-# the warsow package and create an orig tarball of it.
-
-USAGE="\
-warsow orig tarball download script\n\
-This script will generate an orig tarball that's distrubeted through Debian.\n\
-Usage: warsow-tarball.sh [OPTION]\n\
-\n\
- -h, --help Display this text\n\
---keep-upstream Don't delete the upstream source tarball\n\
---keep-orig-dir Don't delete the orig directory\n"
-
-
-while [ "$#" -gt "0" ]
-do
- case "$1" in
- -h|--help)
- echo -e ${USAGE}
- exit 0
- ;;
- --keep-upstream)
- KEEP_UPSTREAM=1
- shift
- ;;
- --keep-orig-dir)
- KEEP_ORIG_DIR=1
- shift
- ;;
- esac
-done
-
-# Some variables to ease maintanence of this script
-WARSOW_VERSION=0.32.dfsg
-WARSOW_TARBALL=warsow_0.32_sdk.zip
-WARSOW_TARBALL_CHECKSUM=551b7a0cebd0c02968ce86fb12cd86b7
-
-# List of mirrors to use
-MIRROR1=http://dl.warsow.us
-MIRROR2=http://www.clan-klo.de/downloads/warsow
-MIRROR3=http://warsow.as-mirror.net
-
-if [ ! -f $WARSOW_TARBALL ] ; then
- # Try each mirror until sucessful, else exit with an error
- wget -c $MIRROR1/$WARSOW_TARBALL || \
- wget -c $MIRROR2/$WARSOW_TARBALL || \
- wget -c $MIRROR3/$WARSOW_TARBALL || \
- { echo "Could not download upstream source" ; exit 1 ; }
-fi
-
-# Verify the checksum
-COMPUTED_CHECKSUM=`md5sum $WARSOW_TARBALL | cut -d ' ' -f 1`
-
-if [ $WARSOW_TARBALL_CHECKSUM != $COMPUTED_CHECKSUM ] ; then
- echo "Checksum verification failed. Checksum was $COMPUTED_CHECKSUM
-Expected checksum $WARSOW_TARBALL_CHECKSUM"
- exit 1
-else
- echo "Checksum verified. Checksum is $COMPUTED_CHECKSUM."
-fi
-
-# Prepare the warsow orig tarball
-if [ ! -d warsow-$WARSOW_VERSION ]; then
- echo "Extracting $WARSOW_TARBALL"
- unzip -qq -d warsow-$WARSOW_VERSION $WARSOW_TARBALL
-else
- echo "Already found extracted warsow-$WARSOW_VERSION directory. Please remove or move warsow-$WARSOW_VERSION and also warsow_$WARSOW_VERSION.orig.tar.gz."
- exit 1
-fi
-
-rm -r warsow-$WARSOW_VERSION/mapping warsow-$WARSOW_VERSION/modelling warsow-$WARSOW_VERSION/other
-rm -r warsow-$WARSOW_VERSION/warsow_0.32/libsrcs
-rm -r warsow-$WARSOW_VERSION/warsow_0.32/source/win32
-
-# Create the tarball
-if [ ! -f warsow_$WARSOW_VERSION.orig.tar.gz ]; then
- echo "Creating orig tarball."
- tar -czf warsow_$WARSOW_VERSION.orig.tar.gz warsow-$WARSOW_VERSION/
- if [ -z $KEEP_UPSTREAM ]; then
- echo "Removing upstream tarball"
- rm -f $WARSOW_TARBALL
- fi
- if [ -z $KEEP_ORIG_DIR ]; then
- echo "Removing orig directory"
- rm -rf warsow-$WARSOW_VERSION/
- fi
-else
- echo "Already found warsow_$WARSOW_VERSION.orig.tar.gz. Please remove or move warsow-$WARSOW_VERSION and also warsow_$WARSOW_VERSION.orig.tar.gz."
- exit 1
-fi
Copied: packages/trunk/warsow/debian/warsow-get-orig-source (from rev 5246, packages/trunk/warsow/debian/scripts/warsow-tarball.sh)
===================================================================
--- packages/trunk/warsow/debian/warsow-get-orig-source (rev 0)
+++ packages/trunk/warsow/debian/warsow-get-orig-source 2008-01-06 17:40:44 UTC (rev 5247)
@@ -0,0 +1,90 @@
+#! /bin/sh
+
+# This script will download the upstream tarball that contains the content of
+# the warsow package and create an orig tarball of it.
+
+# Some variables to ease maintanence of this script
+WARSOW_VERSION=0.32.dfsg
+WARSOW_TARBALL=warsow_0.32_sdk.zip
+WARSOW_TARBALL_CHECKSUM=551b7a0cebd0c02968ce86fb12cd86b7
+
+USAGE="\
+warsow orig tarball download script\n\
+This script will generate an orig tarball that's distrubeted through Debian.\n\
+Usage: warsow-tarball.sh [OPTION]\n\
+\n\
+ -h, --help Display this text\n\
+--keep-upstream Don't delete the upstream source tarball\n\
+--keep-orig-dir Don't delete the orig directory\n"
+
+while [ "$#" -gt "0" ]
+do
+ case "$1" in
+ -h|--help)
+ echo -e "${USAGE}"
+ exit 1
+ ;;
+ --keep-upstream-tarball)
+ KEEP_UPSTREAM_TARBALL=1
+ shift
+ ;;
+ --keep-orig-dir)
+ KEEP_ORIG_DIR=1
+ shift
+ ;;
+ esac
+done
+
+# List of mirrors to use
+MIRROR1=http://dl.warsow.us
+MIRROR2=http://www.clan-klo.de/downloads/warsow
+MIRROR3=http://warsow.as-mirror.net
+
+if [ ! -f $WARSOW_TARBALL ] ; then
+ # Try each mirror until sucessful, else exit with an error
+ wget -c $MIRROR1/$WARSOW_TARBALL || \
+ wget -c $MIRROR2/$WARSOW_TARBALL || \
+ wget -c $MIRROR3/$WARSOW_TARBALL || \
+ { echo "Could not download upstream source" ; exit 1 ; }
+fi
+
+# Verify the checksum
+COMPUTED_CHECKSUM=`md5sum $WARSOW_TARBALL | cut -d ' ' -f 1`
+
+if [ $WARSOW_TARBALL_CHECKSUM != $COMPUTED_CHECKSUM ] ; then
+ echo "Checksum verification failed. Checksum was $COMPUTED_CHECKSUM
+Expected checksum $WARSOW_TARBALL_CHECKSUM"
+ exit 1
+else
+ echo "Checksum verified. Checksum is $COMPUTED_CHECKSUM."
+fi
+
+# Prepare the warsow orig tarball
+if [ ! -d warsow-$WARSOW_VERSION ]; then
+ echo "Extracting $WARSOW_TARBALL"
+ unzip -d -qq warsow-$WARSOW_VERSION $WARSOW_TARBALL
+else
+ echo "Already found extracted warsow-$WARSOW_VERSION directory. Please remove or move warsow-$WARSOW_VERSION and also warsow_$WARSOW_VERSION.orig.tar.gz."
+ exit 1
+fi
+
+rm -r warsow-$WARSOW_VERSION/mapping warsow-$WARSOW_VERSION/modelling warsow-$WARSOW_VERSION/other
+rm -r warsow-$WARSOW_VERSION/warsow_0.32/libsrcs
+rm -r warsow-$WARSOW_VERSION/warsow_0.32/source/win32
+
+# Create the tarball
+if [ ! -f warsow_$WARSOW_VERSION.orig.tar.gz ]; then
+ echo "Creating orig tarball."
+ tar -czf warsow_$WARSOW_VERSION.orig.tar.gz warsow-$WARSOW_VERSION/
+ if [ -z $KEEP_UPSTREAM_TARBALL ]; then
+ echo "Removing upstream tarball"
+ rm -f $WARSOW_TARBALL
+ fi
+ if [ -z $KEEP_ORIG_DIR ]; then
+ echo "Removing orig directory"
+ rm -rf warsow-$WARSOW_VERSION/
+ fi
+else
+ echo "Already found warsow_$WARSOW_VERSION.orig.tar.gz. Please remove or move warsow-$WARSOW_VERSION and also warsow_$WARSOW_VERSION.orig.tar.gz."
+ exit 1
+fi
More information about the Pkg-games-commits
mailing list