netradiant-custom/install-gamepack.sh
2010-08-17 20:58:36 +02:00

24 lines
341 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