Saxum/package.sh

36 lines
678 B
Bash
Raw Normal View History

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 ]]
then
2014-11-24 18:54:13 +00:00
./build.sh clean
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 ..
mkdir "Saxum_${platform^}"
cp -r binaries data LICENSE.txt "Saxum_${platform^}"
2015-03-15 21:51:32 +00:00
zip -9r "Saxum_${platform^}.zip" "Saxum_${platform^}"
rm -rf "Saxum_${platform^}"
2014-11-24 14:12:18 +00:00
fi