uncrustify iqmmodel code
[xonotic/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 # Some per-game workaround for malformed gamepack
16 case $pack in
17         */JediAcademyPack)
18                 pack="$pack/Tools"
19         ;;
20         */PreyPack|*/Q3Pack)
21                 pack="$pack/tools"
22         ;;
23         */WolfPack)
24                 pack="$pack/bin"
25         ;;
26 esac
27
28 for GAMEFILE in "$pack/games"/*.game; do
29         if [ x"$GAMEFILE" != x"$pack/games/*.game" ]; then
30                 $CP "$GAMEFILE" "$dest/games/"
31         fi
32 done
33 for GAMEDIR in "$pack"/*.game; do
34         if [ x"$GAMEDIR" != x"$pack/*.game" ]; then
35                 $CP_R "$GAMEDIR" "$dest/"
36         fi
37 done