separate out the process of installing a game pack into a .sh file, for later "adding gamepacks to binary releases"

git-svn-id: svn://svn.icculus.org/netradiant/trunk@421 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
divverent
2010-02-04 09:55:28 +00:00
parent c07007fb1e
commit 32dcbf7747
3 changed files with 59 additions and 19 deletions

23
install-gamepack.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
# installs a game pack
# Usage:
# install-gamepack.sh gamepack installdir
set -ex
: ${CP:=cp}
: ${CP_R:=cp -r}
pack=$1
dest=$2
if [ -d "$pack/tools" ]; then
pack="$pack/tools"
fi
for GAMEFILE in "$pack/games"/*.game; do
$CP "$GAMEFILE" "$dest/games/"
done
for GAMEDIR in "$pack"/*.game/; do
$CP_R "$GAMEDIR" "$dest/"
done