[game-data-packager] 30/39: Remove unused code from YAML games, and use a generic go() method

Simon McVittie smcv at debian.org
Sun Jan 11 01:52:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository game-data-packager.

commit 94d193da0c340d23283f0fb8a5dd7fe6376e995b
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Jan 10 21:36:37 2015 +0000

    Remove unused code from YAML games, and use a generic go() method
---
 lib/via-python             | 16 +++++++---------
 supported/ja               | 32 --------------------------------
 supported/jk2              | 32 --------------------------------
 supported/quake3           |  4 ----
 supported/rtcw             | 34 ----------------------------------
 supported/spear-of-destiny |  4 ----
 supported/tyrian           |  5 -----
 7 files changed, 7 insertions(+), 120 deletions(-)

diff --git a/lib/via-python b/lib/via-python
index 1c9fc4c..b3d1fef 100644
--- a/lib/via-python
+++ b/lib/via-python
@@ -3,14 +3,7 @@
 # Data-driven game-data-packager code for Jedi Outcast, Jedi Academy,
 # Return to Castle Wolfenstein; hopefully generalizable to others.
 #
-# Must define LONGNAME, deb first.
-
-sum="sha256"
-
-copyin () {
-    install -d `dirname "$2"`
-    install -m644 "$1" "$2"
-}
+# Must define SHORTNAME, LONGNAME first.
 
 gdp_data_driven () {
     if [ "$*" = "" ]; then
@@ -44,7 +37,8 @@ gdp_data_driven () {
         set _ -d "$OUTDIR" "$@"
         shift
     fi
-    debug "Will run: python3 -m game_data_packager $*"
+    debug "Packaging $LONGNAME via Python code"
+    debug "Will run: python3 -m game_data_packager $SHORTNAME $*"
     python3 -m game_data_packager "$@"
     exit $?
     )
@@ -61,3 +55,7 @@ gdp_data_driven () {
     # need to deal with this in shell script any more
     INSTALL=no
 }
+
+go () {
+    gdp_data_driven "$SHORTNAME" "$@"
+}
diff --git a/supported/ja b/supported/ja
index e30f07a..7758c30 100644
--- a/supported/ja
+++ b/supported/ja
@@ -2,37 +2,5 @@
 
 SHORTNAME=ja
 LONGNAME="Star Wars Jedi Knight: Jedi Academy"
-deb=jedi-academy-data
-basedir="/usr/share/games/jedi-academy"
-version_prefix=1.01+
 
 . $LIBDIR/via-python
-
-usage() {
-       printf "\
-Usage:\n\
-\n\
-game-data-packager ${SHORTNAME} [DIRECTORY [DIRECTORY...]]\n\
-\n\
-  Search for PK3 files in DIRECTORY, which should be one of these:\n\
-\n\
-    * an installation of Jedi Academy retail CD-ROM, patched to\n\
-      version 1.01 using Windows or Wine (download\n\
-      jkacademy1_01.exe, sha256:\n\
-      2bb34035ed65f4855e2e17e1b56076543947e426bac794b098b58c039ec253dc)\n\
-\n\
-    * an installation of Jedi Academy installed from Steam
-      (<http://store.steampowered.com/app/6020/>)\n\
-      via Windows or Wine, typically found in \n\
-      C:/Program Files/Steam/steamapps/common/Jedi Academy\n\
-\n\
-game-data-packager ${SHORTNAME} --repack\n\
-\n\
-  Re-package installed data. This is a short cut for\n\
-  'game-data-packager ${SHORTNAME} ${basedir}'.\n\
-"
-}
-
-go () {
-    gdp_data_driven ja "$@"
-}
diff --git a/supported/jk2 b/supported/jk2
index a803ff9..80aef81 100644
--- a/supported/jk2
+++ b/supported/jk2
@@ -2,37 +2,5 @@
 
 SHORTNAME=jk2
 LONGNAME="Star Wars Jedi Knight II: Jedi Outcast"
-deb=jedi-outcast-data
-basedir="/usr/share/games/jedi-outcast"
-version_prefix=1.04+
 
 . $LIBDIR/via-python
-
-usage() {
-       printf "\
-Usage:\n\
-\n\
-game-data-packager ${SHORTNAME} [DIRECTORY [DIRECTORY...]]\n\
-\n\
-   earch for PK3 files in DIRECTORY, which should be one of these:\n\
-\n\
-    * an installation of Jedi Outcast retail CD-ROM, patched to\n\
-      version 1.04 using Windows or Wine (download\n\
-      jkiiup104.exe, sha256:\n\
-      de80f478a48f91d6237b8efc7048e4803a198e9ac02f11d64980eddcd818fad7)\n\
-\n\
-    * an installation of Jedi Outcast installed from Steam
-      (<http://store.steampowered.com/app/6030/>)\n\
-      via Windows or Wine, typically found in \n\
-      C:/Program Files/Steam/steamapps/common/Jedi Outcast\n\
-\n\
-game-data-packager ${SHORTNAME} --repack\n\
-\n\
-  Re-package installed data. This is a short cut for\n\
-  'game-data-packager ${SHORTNAME} ${basedir}'.\n\
-"
-}
-
-go () {
-    gdp_data_driven jk2 "$@"
-}
diff --git a/supported/quake3 b/supported/quake3
index 3e85d7c..7b41cc0 100644
--- a/supported/quake3
+++ b/supported/quake3
@@ -4,7 +4,3 @@ SHORTNAME=quake3
 LONGNAME="Quake III Arena"
 
 . $LIBDIR/via-python
-
-go () {
-    gdp_data_driven quake3 "$@"
-}
diff --git a/supported/rtcw b/supported/rtcw
index aa43540..da80f64 100644
--- a/supported/rtcw
+++ b/supported/rtcw
@@ -2,39 +2,5 @@
 
 SHORTNAME=rtcw
 LONGNAME="Return to Castle Wolfenstein"
-deb=rtcw-data
-basedir="/usr/share/games/rtcw"
-version_prefix=1.42b+
 
 . $LIBDIR/via-python
-
-usage() {
-       printf "\
-Usage:\n\
-\n\
-game-data-packager ${SHORTNAME} [DIRECTORY|PATCH ...]\n\
-\n\
-   DIRECTORY should be any of these:\n\
-\n\
-    * an installation of Return to Castle Wolfenstein from Windows or Wine\n\
-\n\
-    * an installation of Return to Castle Wolfenstein from Steam
-      (<http://store.steampowered.com/app/9010/>)\n\
-      via Windows or Wine, typically found in \n\
-      C:/Program Files/Steam/steamapps/common/Return to Castle Wolfenstein\n\
-\n\
-    PATCH is wolf-linux-1.4-full.x86.run (71 MiB) and is not required if a\n\
-    Steam installation is provided). It will be downloaded automatically\n\
-    if necessary. sha256:\n\
-    de2b0728ef9286eefb69a65c0badb260319d8bd806ecd3903e915b0580eb2f12\n\
-\n\
-game-data-packager ${SHORTNAME} --repack\n\
-\n\
-  Re-package installed data. This is a short cut for\n\
-  'game-data-packager ${SHORTNAME} ${basedir}'.\n\
-"
-}
-
-go () {
-    gdp_data_driven rtcw "$@"
-}
diff --git a/supported/spear-of-destiny b/supported/spear-of-destiny
index a682a83..224d3e4 100644
--- a/supported/spear-of-destiny
+++ b/supported/spear-of-destiny
@@ -2,7 +2,3 @@ SHORTNAME=spear-of-destiny
 LONGNAME="Spear of Destiny (Wolfenstein 3D prequel)"
 
 . "$LIBDIR/via-python"
-
-go() {
-    gdp_data_driven spear-of-destiny "$@"
-}
diff --git a/supported/tyrian b/supported/tyrian
index f91b307..7275645 100644
--- a/supported/tyrian
+++ b/supported/tyrian
@@ -1,9 +1,4 @@
 SHORTNAME=tyrian
 LONGNAME="Tyrian"
-deb=tyrian-data
 
 . $LIBDIR/via-python
-
-go() {
-    gdp_data_driven tyrian "$@"
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list