r7730 - in packages/trunk/game-data-packager: . supported
Jon Dowland
jmtd-guest at alioth.debian.org
Wed Jul 16 13:53:12 UTC 2008
Author: jmtd-guest
Date: 2008-07-16 13:53:12 +0000 (Wed, 16 Jul 2008)
New Revision: 7730
Modified:
packages/trunk/game-data-packager/game-data-packager
packages/trunk/game-data-packager/supported/doom
packages/trunk/game-data-packager/supported/doom2
Log:
catch non-existent files
Modified: packages/trunk/game-data-packager/game-data-packager
===================================================================
--- packages/trunk/game-data-packager/game-data-packager 2008-07-16 13:05:04 UTC (rev 7729)
+++ packages/trunk/game-data-packager/game-data-packager 2008-07-16 13:53:12 UTC (rev 7730)
@@ -124,6 +124,15 @@
# setup a working directory
WORKDIR=`mktemp -t -d game-data-packager.XXXXXX`
debug "WORKDIR=$WORKDIR"
+cleanup() {
+ if [ "$PRESERVE" != "yes" ]; then
+ rm "$OUTFILE"
+ fi
+ if [ -d "$WORKDIR" ]; then
+ rmdir "$WORKDIR"
+ fi
+}
+trap cleanup EXIT
# now the game's handler needs to be executed
shift
@@ -141,8 +150,4 @@
install_deb "$OUTFILE"
fi
-# cleanup
-if [ "$PRESERVE" != "yes" ]; then
- rm "$OUTFILE"
-fi
-rmdir "$WORKDIR"
+cleanup
Modified: packages/trunk/game-data-packager/supported/doom
===================================================================
--- packages/trunk/game-data-packager/supported/doom 2008-07-16 13:05:04 UTC (rev 7729)
+++ packages/trunk/game-data-packager/supported/doom 2008-07-16 13:53:12 UTC (rev 7730)
@@ -52,6 +52,10 @@
go() {
verify_args "$@"
WADFILE=`unravel "$1"`
+ if [ ! -f "$WADFILE" ]; then
+ echo "ERROR: '$WADFILE' does not exist." >&2
+ exit
+ fi
MD5SUM=`checksum "$WADFILE"`
debug "WADFILE=$WADFILE"
check_for_v19
Modified: packages/trunk/game-data-packager/supported/doom2
===================================================================
--- packages/trunk/game-data-packager/supported/doom2 2008-07-16 13:05:04 UTC (rev 7729)
+++ packages/trunk/game-data-packager/supported/doom2 2008-07-16 13:53:12 UTC (rev 7730)
@@ -49,9 +49,14 @@
go() {
verify_args "$@"
WADFILE=`unravel "$1"`
+ if [ ! -f "$WADFILE" ]; then
+ echo "ERROR: '$WADFILE' does not exist." >&2
+ exit
+ fi
MD5SUM=`checksum "$WADFILE"`
+ debug "WADFILE=$WADFILE"
check_for_v19
- debug "WADFILE=$WADFILE"
+
DEST=`echo $DATADIR | sed 's,^/,,'`/doom2.wad
if [ "" = "$OUTDIR" ]; then
More information about the Pkg-games-commits
mailing list