r2150 - scripts/trunk

Bruno Fuddl-guestquot; Fuddl" Kleinert fuddl-guest at alioth.debian.org
Thu Dec 14 22:41:54 CET 2006


Author: fuddl-guest
Date: 2006-12-14 22:41:54 +0100 (Thu, 14 Dec 2006)
New Revision: 2150

Modified:
   scripts/trunk/nexuiz-prepare.sh
Log:
made nexuiz-prepare.sh use blah/nexuiz-*.zip as 1st argument and check the file for correct md5sum

Modified: scripts/trunk/nexuiz-prepare.sh
===================================================================
--- scripts/trunk/nexuiz-prepare.sh	2006-12-14 21:40:11 UTC (rev 2149)
+++ scripts/trunk/nexuiz-prepare.sh	2006-12-14 21:41:54 UTC (rev 2150)
@@ -1,35 +1,40 @@
 #!/bin/sh
 
 VERSION=2.2.1
-ARCHIVE=nexuiz-221.zip
+ARCHIVEMD5=25f3943eae669a8a500865cc900b6bac
 ENGINEZIP=enginesource20061212.zip
 GAMESRCZIP=gamesource20061212.zip
 
 if [ $# != 1 ]; then
-	echo "Usage: nexuiz-prepare.sh /path/to/$ARCHIVE"
+	echo "Usage: nexuiz-prepare.sh /path/to/nexuiz-*.zip"
 	exit 1
 fi
 
 if [ ! -f /usr/bin/unzip ]; then
 	echo "Please aptitude install unzip"
-	exit 2
+	exit 1
 fi
 
 if [ ! -f /usr/bin/svn ]; then
 	echo "Please aptitude install subversion"
-	exit 3
+	exit 1
 fi
 
-if [ ! -e $1/$ARCHIVE ]; then
-	echo "Couldn't find $ARCHIVE in path $1"
-	exit 127
+if [ ! -e $1 ]; then
+	echo "Couldn't find $1"
+	exit 1
 fi
 
-echo "Using $1/$ARCHIVE as source archive"
+if [ ! `md5sum $1 | cut -f1 -d' '` = $ARCHIVEMD5 ]; then
+	echo "MD5 sum mismatch! Are you sure to package the right version of Nexuiz?"
+	exit 1
+fi
+
+echo "Using $1 as usptream archive"
 rm -rf ./nexuiz-tmp
-mkdir -p ./nexuiz-tmp && unzip -d ./nexuiz-tmp $1/$ARCHIVE
+mkdir -p ./nexuiz-tmp && unzip -d ./nexuiz-tmp $1
 if [ "$?" != "0" ]; then
-	echo "Failed to get unzip $ARCHIVE, bailing out..."
+	echo "Failed to get unzip $1, bailing out..."
 	rm -rf ./nexuiz-tmp
 	exit 1;
 fi




More information about the Pkg-games-commits mailing list