[SCM] Installer for game data files branch, rott, updated. 3861f452fe046546e3305392894e0057b5f481dc
Jon Dowland
jmtd at debian.org
Wed Feb 3 14:41:55 UTC 2010
The following commit has been merged in the rott branch:
commit 3861f452fe046546e3305392894e0057b5f481dc
Author: Jon Dowland <jmtd at debian.org>
Date: Wed Feb 3 14:33:59 2010 +0000
implement gdp_unzip: wrapper around 7z/unzip
diff --git a/debian/control b/debian/control
index 62a05c2..12aafa4 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Vcs-Git: git://git.debian.org/git/pkg-games/game-data-packager
Vcs-Browser: http://git.debian.org/?p=pkg-games/game-data-packager.git
Package: game-data-packager
-Depends: fakeroot, sudo, ${misc:Depends}
+Depends: fakeroot, sudo, unzip | p7zip-full, ${misc:Depends}
Conflicts: doom-package
Replaces: doom-package
Provides: doom-package
diff --git a/lib/game-data-packager-shared b/lib/game-data-packager-shared
index d1b2f79..950747a 100644
--- a/lib/game-data-packager-shared
+++ b/lib/game-data-packager-shared
@@ -186,3 +186,15 @@ else
GAME_PACKAGE_VERSION=`dpkg-query --showformat='${Version}\n' \
--show game-data-packager`
fi
+
+gdp_unzip() {
+ zipfile="$1"
+ shift
+ if which 7z >/dev/null; then
+ debug "using 7z"
+ 7z e -y "$zipfile" "$@" >/dev/null
+ else
+ debug "using unzip"
+ unzip -qqo "$zipfile" "$@"
+ fi
+}
diff --git a/supported/rott b/supported/rott
index 75edb2d..957f813 100644
--- a/supported/rott
+++ b/supported/rott
@@ -56,8 +56,8 @@ go() {
oldpwd=`pwd`
cd "$WORKDIR"
- unzip -qqo "$ZIPFILE" ROTTSW13.SHR
- unzip -qqo "ROTTSW13.SHR"
+ gdp_unzip "$ZIPFILE" ROTTSW13.SHR
+ gdp_unzip ROTTSW13.SHR
rm ROTTSW13.SHR
# list of files from within the ZIP-inside-ZIP required for play
--
Installer for game data files
More information about the Pkg-games-commits
mailing list