]> git.xonotic.org Git - xonotic/gmqcc.git/blob - misc/nexuiz_export.sh
there's no pushd/popd in my sh
[xonotic/gmqcc.git] / misc / nexuiz_export.sh
1 #!/bin/sh
2
3 if [ ! -d qcsrc ]; then
4     echo "failed to find qcsrc directory in $(pwd), please run this script"
5     echo "from nexuiz data directory"
6     exit 1
7 else
8     # ensure this is actually a xonotic repo
9     pushd qcsrc > /dev/null
10     if [ ! -d client -o ! -d common -o ! -d menu -o ! -d server -o ! -d warpzonelib ]; then
11         echo "this doesnt look like a nexuiz source tree, aborting"
12         popd > /dev/null
13         exit 1
14     fi
15 fi
16
17 echo -n "removing redundant files ..."
18 rm -f nexuiz.ncb
19 rm -f nexuiz.sln
20 rm -f nexuiz.suo
21 rm -f nexuiz.vcproj
22 rm -f nexuiz.vcproj.user
23 echo "complete"
24
25 echo -n "creating projects ..."
26 echo "client" >  dirs
27 echo "server" >> dirs
28 echo "menu"   >> dirs
29
30 echo "complete"
31
32 echo -n "creating zip archive ..."
33 zip -r -9 ../nexuiz.zip * > /dev/null
34 echo "complete"
35
36 popd > /dev/null
37 echo "finished!"