summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2003-07-18 17:20:22 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2003-07-18 17:20:22 +0000
commit6b178d9f174530f119fe97937f02cbb2971eb398 (patch)
tree2becee16ba1c765f34c01017ea0ec3e47d407639 /eclass
parentrepomanz0r (diff)
downloadhistorical-6b178d9f174530f119fe97937f02cbb2971eb398.tar.gz
historical-6b178d9f174530f119fe97937f02cbb2971eb398.tar.bz2
historical-6b178d9f174530f119fe97937f02cbb2971eb398.zip
Add games_ut_unpack
Diffstat (limited to 'eclass')
-rw-r--r--eclass/games.eclass25
1 files changed, 24 insertions, 1 deletions
diff --git a/eclass/games.eclass b/eclass/games.eclass
index 5468289d08f8..87459e79e963 100644
--- a/eclass/games.eclass
+++ b/eclass/games.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.41 2003/07/18 15:10:13 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.42 2003/07/18 17:20:22 wolf31o2 Exp $
#
# devlist: {bass,phoenix,vapier}@gentoo.org
#
@@ -145,3 +145,26 @@ games_verify_cd() {
die "You must provide the $* data before running the install"
fi
}
+
+# Unpack .uz(2) files for UT/UT2003
+# $1: directory or file to unpack
+games_ut_unpack() {
+ if [ -z "${ut_unpack}" ]; then
+ die "You must provide an argument to games_ut_unpack"
+ fi
+ if [ -f "${ut_unpack}" ]; then
+ ./ucc decompress ${ut_unpack} --nohomedir || die "uncompressing file ${ut_unpack}"
+ fi
+ if [ -d "${ut_unpack}" ]; then
+ for f in `find ${ut_unpack} -name '*.uz' -printf '%f'` ; do
+ ./ucc decompress ${ut_unpack}/${f} --nohomedir || die "uncompressing file ${f}"
+ mv System/${f:0:${#f}-3} ${ut_unpack} || die "moving file ${f}
+ rm ${ut_unpack}/${f} || die "deleting compressed file ${f}"
+ done
+ for f in `find ${ut_unpack} -name '*.uz2' -printf '%f'` ; do
+ ./ucc decompress ${ut_unpack}/${f} --nohomedir || die "uncompressing file ${f}"
+ #mv System/${f:0:${#f}-4} ${ut_unpack} || die "moving file ${f}
+ rm ${ut_unpack}/${f} || die "deleting compressed file ${f}"
+ done
+ fi
+}