]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - install-gamepack.sh
misc_model: also support _skin name; also support frame field name
[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 if [ -d "$pack/tools" ]; then
16         pack="$pack/tools"
17 fi
18 for GAMEFILE in "$pack/games"/*.game; do
19         if [ x"$GAMEFILE" != x"$pack/games/*.game" ]; then
20                 $CP "$GAMEFILE" "$dest/games/"
21         fi
22 done
23 for GAMEDIR in "$pack"/*.game; do
24         if [ x"$GAMEDIR" != x"$pack/*.game" ]; then
25                 $CP_R "$GAMEDIR" "$dest/"
26         fi
27 done