Commit 32dcbf77 authored by divverent's avatar divverent

separate out the process of installing a game pack into a .sh file, for later...

separate out the process of installing a game pack into a .sh file, for later "adding gamepacks to binary releases"

git-svn-id: svn://svn.icculus.org/netradiant/trunk@421 61c419a2-8eb2-4b30-bcec-8cead039b335
parent c07007fb
......@@ -958,19 +958,7 @@ install-data: binaries
[ "$(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
......
......@@ -4,6 +4,8 @@
# sh download-gamepack.sh
# LICENSEFILTER=GPL BATCH=1 sh download-gamepack.sh
set -e
pack()
{
pack=$1; shift
......@@ -17,6 +19,18 @@ pack()
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
......@@ -70,13 +84,28 @@ pack()
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/
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment