forked from aburch/simutrans
-
Notifications
You must be signed in to change notification settings - Fork 1
/
distribute.sh
executable file
·42 lines (36 loc) · 987 Bytes
/
distribute.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#
# CHANGE THIS FOR BEOS, CYGWIN, ETC!
if [ $MSYSTEM = MINGW32 ]
then
simexe=.exe
simarchiv=simuwin
echo "Windows"
updatepath="/nsis/"
updater="download-paksets.exe"
else
simexe=
simarchiv=simulinux
updatepath="/"
updater="get_pak.sh"
echo "Linux"
fi
# (otherwise there will be many .svn included under windows)
distribute()
{
# pack all files of the current release
FILELISTE=`find simutrans -type f "(" -name "*.tab" -o -name "*.mid" -o -name "*.bdf" -o -name "*.fnt" -o -name "*.txt" -o -name "*.dll" -o -name "*.pak" -o -name "*.nut" ")"`
zip -9 $simarchiv.zip $FILELISTE simutrans/simutrans$simexe simutrans/$updater
}
# fetch language files
sh ./get_lang_files.sh
# now built the archive for distribution
cd simutrans
cp ../sim$simexe ./simutrans$simexe
strip simutrans$simexe
cp ..$updatepath$updater $updater
cd ..
distribute
# .. finally delete executable and language files
rm simutrans/simutrans$simexe
#rm simutrans/text/*.tab