2014-11-24 14:12:18 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ $1 == "" ]]
|
|
|
|
then
|
|
|
|
echo "Please select a target platform (linux or windows)"
|
|
|
|
exit
|
|
|
|
elif [[ $1 == "linux" ]]
|
|
|
|
then
|
|
|
|
platform="linux"
|
|
|
|
elif [[ $1 == "windows" ]]
|
|
|
|
then
|
|
|
|
platform="windows"
|
|
|
|
fi
|
|
|
|
|
2014-11-24 18:54:13 +00:00
|
|
|
binaries=$(ls binaries)
|
|
|
|
if [[ $binaries == *.exe && $platform == linux ]]
|
|
|
|
then
|
|
|
|
./build.sh clean
|
|
|
|
elif [[ $binaries != *.exe && $platform == windows ]]
|
2014-11-24 14:59:59 +00:00
|
|
|
then
|
2014-11-24 18:54:13 +00:00
|
|
|
./build.sh clean
|
2014-11-24 14:59:59 +00:00
|
|
|
fi
|
2014-11-24 14:12:18 +00:00
|
|
|
|
2015-03-11 11:25:46 +00:00
|
|
|
./build.sh $platform Release
|
2014-11-24 18:54:13 +00:00
|
|
|
|
2014-11-24 14:12:18 +00:00
|
|
|
rc=$?
|
|
|
|
|
|
|
|
if [[ $rc == 0 ]]
|
|
|
|
then
|
2015-03-12 14:59:50 +00:00
|
|
|
cd binaries; strip -s *; cd ..
|
2014-11-24 14:12:18 +00:00
|
|
|
mkdir "MarbleGame_${platform^}"
|
2015-03-12 12:26:14 +00:00
|
|
|
cp -r binaries data LICENSE.txt "MarbleGame_${platform^}"
|
2014-11-24 14:12:18 +00:00
|
|
|
zip -r "MarbleGame_${platform^}.zip" "MarbleGame_${platform^}"
|
|
|
|
rm -rf "MarbleGame_${platform^}"
|
|
|
|
fi
|