r5243 - packages/trunk/ogre/debian

Andres Mejia ceros-guest at alioth.debian.org
Sun Jan 6 05:39:24 UTC 2008


Author: ceros-guest
Date: 2008-01-06 05:39:23 +0000 (Sun, 06 Jan 2008)
New Revision: 5243

Modified:
   packages/trunk/ogre/debian/ogre-get-orig-source
Log:
Modified ogre-get-orig-source script

Modified: packages/trunk/ogre/debian/ogre-get-orig-source
===================================================================
--- packages/trunk/ogre/debian/ogre-get-orig-source	2008-01-06 04:52:48 UTC (rev 5242)
+++ packages/trunk/ogre/debian/ogre-get-orig-source	2008-01-06 05:39:23 UTC (rev 5243)
@@ -8,6 +8,33 @@
 OGRE_TARBALL=ogre-linux_osx-v1-4-6.tar.bz2
 OGRE_TARBALL_CHECKSUM=ef1cf73106e0387624bfdd539cdf9de6
 
+USAGE="\n\
+This script is used to generate the orig tarball used in building\n\
+Debian packages for ogre-$OGRE_VERSION.\n\
+Usage: ogre-get-orig-source [OPTION]\n\
+\n\
+ -h, --help                 Display this help message.\n\
+ --keep-upstream-tarball    Keep the upstream source tarball.\n\
+ --keep-orig-dir            Keep the generated orig directory.\n"
+
+while [ "$#" -gt "0" ]
+do
+    case "$1" in
+        -h|--help)
+            echo "${USAGE}"
+            exit 1
+            ;;
+        --keep-upstream-tarball)
+            KEEP_UPSTREAM_TARBALL=1
+            shift
+            ;;
+        --keep-orig-dir)
+            KEEP_ORIG_DIR=1
+            shift
+            ;;
+    esac
+done
+
 if [ ! -f $OGRE_TARBALL ] ; then
 # Download the tarball
 wget http://downloads.sourceforge.net/ogre/$OGRE_TARBALL
@@ -93,12 +120,18 @@
 
 # Create the tarball
 if [ ! -f ogre_$OGRE_VERSION.orig.tar.gz ]; then
-	echo "Creating orig tarball."
-	tar -czf ogre_$OGRE_VERSION.orig.tar.gz ogre-$OGRE_VERSION/
-	echo "Removing extracted directory."
-	rm -rf ogre-$OGRE_VERSION/
+    echo "Creating orig tarball."
+    tar -czf ogre_$OGRE_VERSION.orig.tar.gz ogre-$OGRE_VERSION/
+    if [ -z $KEEP_ORIG_DIR ]; then
+        echo "Removing extracted directory."
+        rm -rf ogre-$OGRE_VERSION/
+    fi
+    if [ -z $KEEP_UPSTREAM_TARBALL ]; then
+        echo "Removing upstream tarball"
+        rm $OGRE_TARBALL
+    fi
 else
-	echo "Already found orig tarball. Please remove or move ogrenew 
+    echo "Already found orig tarball. Please remove or move ogrenew 
 and ogre-$OGRE_VERSION directories and also ogre_$OGRE_VERSION.orig.tar.gz."
-	exit 1
+    exit 1
 fi




More information about the Pkg-games-commits mailing list