From 8245e0782e49fdcfdfc46702a57fbdc853e1828e Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 24 Nov 2014 15:12:18 +0100 Subject: [PATCH] Added package script. --- .gitignore | 1 + package.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 package.sh diff --git a/.gitignore b/.gitignore index 064ad33..53dc1b0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ Makefile CMakeLists.txt.user *.cbp *~ +*.zip diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..5d4be5f --- /dev/null +++ b/package.sh @@ -0,0 +1,32 @@ +#!/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 + +./build.sh clean + +./build.sh $platform + +rc=$? + +if [[ $rc == 0 ]] +then + rm -rf "MarbleGame_${platform^}" "MarbleGame_${platform^}.zip" + mkdir "MarbleGame_${platform^}" + cp -r binaries Levels Shader "MarbleGame_${platform^}" + zip -r "MarbleGame_${platform^}.zip" "MarbleGame_${platform^}" + if hash megacmd 2>/dev/null + then + megacmd put "MarbleGame_${platform^}.zip" mega:/GameBuilds/ + fi + rm -rf "MarbleGame_${platform^}" +fi