netradiant-custom/install-gamepack.sh
2010-04-12 08:00:39 +02:00

24 lines
342 B
Bash
Executable File

#!/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