r7743 - in packages/branches/game-data-packager/consolidate-doom: lib supported
Jon Dowland
jmtd-guest at alioth.debian.org
Wed Jul 16 16:48:29 UTC 2008
Author: jmtd-guest
Date: 2008-07-16 16:48:29 +0000 (Wed, 16 Jul 2008)
New Revision: 7743
Added:
packages/branches/game-data-packager/consolidate-doom/lib/doom-common
Modified:
packages/branches/game-data-packager/consolidate-doom/supported/doom
packages/branches/game-data-packager/consolidate-doom/supported/doom2
Log:
move common doom stuff to doom-common
Added: packages/branches/game-data-packager/consolidate-doom/lib/doom-common
===================================================================
--- packages/branches/game-data-packager/consolidate-doom/lib/doom-common (rev 0)
+++ packages/branches/game-data-packager/consolidate-doom/lib/doom-common 2008-07-16 16:48:29 UTC (rev 7743)
@@ -0,0 +1,40 @@
+# vim: set ft=sh:
+
+verify_args() {
+ if [ $# -ne 1 ]; then
+ echo "error: no wadfile specified" >&2
+ usage >&2
+ doom2_usage >&2
+ exit 1
+ fi
+}
+checksum() {
+ CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
+ debug "checksum = $CHECKSUM"
+}
+
+check_for_v19() {
+ case "$CHECKSUM" in
+ "c4fe9fd920207691a9f493668e0a2083")
+ debug "doom.wad is a v1.9 IWAD (ultimate doom)"
+ ;;
+ "1cd63c5ddff1bf8ce844237f580e9cf3")
+ debug "doom.wad is a v1.9 IWAD (registered)"
+ ;;
+ *)
+ warn "the doom.wad file is not version 1.9"
+ warn "(or has been modified)"
+ warn "you may have some problems with PWADs and demos"
+ ;;
+ esac
+
+}
+
+DATADIR="/usr/share/games/game-data-packager"
+
+if [ -f "$PWD/$DEBBASE" ]; then
+ DEB="$PWD/$DEBBASE"
+else
+ DEB="$DATADIR/$DEBBASE"
+fi
+
Modified: packages/branches/game-data-packager/consolidate-doom/supported/doom
===================================================================
--- packages/branches/game-data-packager/consolidate-doom/supported/doom 2008-07-16 16:43:07 UTC (rev 7742)
+++ packages/branches/game-data-packager/consolidate-doom/supported/doom 2008-07-16 16:48:29 UTC (rev 7743)
@@ -1,28 +1,21 @@
-# vim: set ft=sh:
+#!/bin/sh
+if [ -f ./lib/game-data-packager-shared ]; then
+ . ./lib/doom-common
+else
+ . /usr/lib/game-data-packager/doom-common
+fi
+
SHORTNAME=doom
LONGNAME="Doom (including Ultimate Doom)"
DEBBASE="doom-wad_${GAME_PACKAGE_VERSION}_all.deb"
-doom2_usage() {
+doom_usage() {
echo "doom game arguments:" >&2
printf "\twadfile - path to a doom.wad\n"
}
-verify_args() {
- if [ $# -ne 1 ]; then
- echo "error: no wadfile specified" >&2
- usage >&2
- doom2_usage >&2
- exit 1
- fi
-}
-checksum() {
- CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
- debug "checksum = $CHECKSUM"
-}
-
check_for_v19() {
case "$CHECKSUM" in
"c4fe9fd920207691a9f493668e0a2083")
@@ -40,14 +33,6 @@
}
-DATADIR="/usr/share/games/game-data-packager"
-
-if [ -f "$PWD/$DEBBASE" ]; then
- DEB="$PWD/$DEBBASE"
-else
- DEB="$DATADIR/$DEBBASE"
-fi
-
go() {
verify_args "$@"
WADFILE=`unravel "$1"`
Modified: packages/branches/game-data-packager/consolidate-doom/supported/doom2
===================================================================
--- packages/branches/game-data-packager/consolidate-doom/supported/doom2 2008-07-16 16:43:07 UTC (rev 7742)
+++ packages/branches/game-data-packager/consolidate-doom/supported/doom2 2008-07-16 16:48:29 UTC (rev 7743)
@@ -1,4 +1,10 @@
-# vim: set ft=sh:
+#!/bin/sh
+#
+if [ -f ./lib/game-data-packager-shared ]; then
+ . ./lib/doom-common
+else
+ . /usr/lib/game-data-packager/doom-common
+fi
SHORTNAME=doom2
LONGNAME="Doom 2"
@@ -10,19 +16,6 @@
printf "\twadfile - path to a doom2.wad\n"
}
-verify_args() {
- if [ $# -ne 1 ]; then
- echo "error: no wadfile specified" >&2
- usage >&2
- doom2_usage >&2
- exit 1
- fi
-}
-checksum() {
- CHECKSUM=`md5sum "$1" | cut -d' ' -f1`
- debug "checksum = $CHECKSUM"
-}
-
check_for_v19() {
case "$CHECKSUM" in
"25e1459ca71d321525f84628f45ca8cd")
@@ -36,15 +29,6 @@
}
-DATADIR="/usr/share/games/game-data-packager"
-
-# XXX: is PWD a bashism?
-if [ -f "$PWD/$DEBBASE" ]; then
- DEB="$PWD/$DEBBASE"
-else
- DEB="$DATADIR/$DEBBASE"
-fi
-
go() {
verify_args "$@"
WADFILE=`unravel "$1"`
More information about the Pkg-games-commits
mailing list