fix these options more
[divverent/netradiant.git] / install-gamepack.sh
1 #!/bin/sh
2
3 # installs a game pack
4 # Usage:
5 #   install-gamepack.sh gamepack installdir
6
7 set -ex
8
9 : ${CP:=cp}
10 : ${CP_R:=cp -r}
11
12 pack=$1
13 dest=$2
14
15 if [ -d "$pack/tools" ]; then
16         pack="$pack/tools"
17 fi
18 for GAMEFILE in "$pack/games"/*.game; do
19         $CP "$GAMEFILE" "$dest/games/"
20 done
21 for GAMEDIR in "$pack"/*.game; do
22         $CP_R "$GAMEDIR" "$dest/"
23 done