r9991 - ! dirs' list truncated !

Jon Dowland jmtd at alioth.debian.org
Wed Jul 8 18:32:00 UTC 2009


Author: jmtd
Date: 2009-07-08 18:31:58 +0000 (Wed, 08 Jul 2009)
New Revision: 9991

Modified:
   packages/branches/game-data-packager/rott/supported/rott
Log:
check input zipfile checksum

Modified: packages/branches/game-data-packager/rott/supported/rott
===================================================================
--- packages/branches/game-data-packager/rott/supported/rott	2009-07-08 18:27:55 UTC (rev 9990)
+++ packages/branches/game-data-packager/rott/supported/rott	2009-07-08 18:31:58 UTC (rev 9991)
@@ -1,6 +1,8 @@
 SHORTNAME=rott
 LONGNAME="Rise of the Triad"
 
+ZIPSUM=0fafd6b629eab80278fc726e31f9cf41
+
 rott_usage() {
 	echo "${SHORTNAME} arguments:"  >&2
 	printf "\tzipfile - path to 1rott13.zip\n" >&2
@@ -15,7 +17,18 @@
 	fi
 }
 
+checksum() {
+	CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
+	debug "checksum = $CHECKSUM"
+}
+
 go() {
 	verify_args "$@"
+	ZIPFILE=`unravel "$1"`
+    [ -f "$ZIPFILE" ] || die "ERROR: '$ZIPFILE' does not exist."
+	checksum "$ZIPFILE"
+	if [ "$CHECKSUM" != "$ZIPSUM" ]; then
+		echo "warning: checksum is not what we expected" >&2
+	fi
 	exit 1
 }




More information about the Pkg-games-commits mailing list