[ "$(OS)" != "Darwin" ] || $(CP_R) setup/data/osx/NetRadiant.app/* $(INSTALLDIR_BASE)/NetRadiant.app/
set -ex; \
for GAME in games/*; do \
- if [ x"$$GAME" = x"games/*" ]; then \
- echo; echo "*** NO GAME PACKS FOUND ***"; echo "Please run download-gamepacks.sh and try again."; echo; echo; \
- continue; \
- fi; \
- if [ -d "$$GAME/tools" ]; then \
- GAME=$$GAME/tools; \
- fi; \
- for GAMEFILE in $$GAME/games/*.game; do \
- $(CP) "$$GAMEFILE" $(INSTALLDIR)/games/; \
- done; \
- for GAMEDIR in $$GAME/*.game; do \
- $(CP_R) "$$GAMEDIR" $(INSTALLDIR)/; \
- done; \
+ CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepack.sh "$$GAME" "$(INSTALLDIR)"; \
done
$(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR
$(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR
# sh download-gamepack.sh
# LICENSEFILTER=GPL BATCH=1 sh download-gamepack.sh
+set -e
+
pack()
{
pack=$1; shift
svn)
svn update "games/$pack" "$@"
;;
+ zip1)
+ rm -rf zipdownload
+ mkdir zipdownload
+ cd zipdownload
+ wget "$source" "$@"
+ unzip *
+ cd ..
+ rm -rf "games/$pack"
+ mkdir "games/$pack"
+ mv zipdownload/*/* "games/$pack/"
+ rm -rf zipdownload
+ ;;
esac
return
fi
svn)
svn checkout "$source" "games/$pack" "$@"
;;
+ zip1)
+ rm -rf zipdownload
+ mkdir zipdownload
+ cd zipdownload
+ wget "$source" "$@"
+ unzip *
+ cd ..
+ mkdir "games/$pack"
+ mv zipdownload/*/* "games/$pack/"
+ rm -rf zipdownload
+ ;;
esac
}
mkdir -p games
-pack NexuizPack GPL svn svn://svn.icculus.org/nexuiz/trunk/misc/netradiant-NexuizPack
-pack Quake2WorldPack GPL svn svn://jdolan.dyndns.org/quake2world/trunk/gtkradiant
-pack DarkPlacesPack GPL svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/DarkPlacesPack/branches/1.5/
-pack WarsowPack GPL svn http://opensvn.csie.org/warsowgamepack/netradiant/games/WarsowPack/
-pack Q3Pack proprietary svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/Q3Pack/trunk/ -r29
-pack UFOAIPack proprietary svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/UFOAIPack/branches/1.5/
+pack DarkPlacesPack GPL svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/DarkPlacesPack/branches/1.5/
+pack NexuizPack GPL svn svn://svn.icculus.org/nexuiz/trunk/misc/netradiant-NexuizPack
+pack OpenArenaPack unknown zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/OpenArenaPack.zip
+pack Q3Pack proprietary svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/Q3Pack/trunk/ -r29
+pack Quake2Pack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake2Pack.zip
+pack Quake2WorldPack GPL svn svn://jdolan.dyndns.org/quake2world/trunk/gtkradiant
+pack QuakePack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/QuakePack.zip
+pack TremulousPack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/TremulousPack.zip
+pack UFOAIPack proprietary svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/UFOAIPack/branches/1.5/
+pack WarsowPack GPL svn http://opensvn.csie.org/warsowgamepack/netradiant/games/WarsowPack/
--- /dev/null
+#!/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