2011-02-06 09:18:43 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DATE=`date +%d.%m.%Y`
|
|
|
|
[ -z "$ARCH" ] && ARCH=`${PREFIX}gcc -dumpmachine | cut -d- -f1`
|
2012-03-04 18:15:01 +01:00
|
|
|
VERSION=`cat src/controller/KissCount.hpp | grep APP_VERSION | cut -d\" -f2`
|
2011-02-06 09:18:43 +01:00
|
|
|
DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}"
|
2012-03-04 18:15:01 +01:00
|
|
|
FILE="$DIR.zip"
|
2011-02-06 09:18:43 +01:00
|
|
|
|
|
|
|
rm -f "$FILE"
|
|
|
|
rm -rf "$DIR"
|
|
|
|
if [ "$1" == "clean" ] ; then
|
|
|
|
make clean
|
|
|
|
fi
|
|
|
|
make || (echo "Compilation failed" ; exit 1)
|
|
|
|
mkdir -p "$DIR"
|
2012-03-04 18:15:01 +01:00
|
|
|
cp -r lib/*.dll* "$DIR"
|
|
|
|
cp -r kc ressources TODO CONTRIBUTORS COPYING README README.fr www "$DIR"
|
|
|
|
mv "$DIR"/kc "$DIR"/kc.exe
|
2011-02-06 09:18:43 +01:00
|
|
|
find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \;
|
2012-03-04 18:15:01 +01:00
|
|
|
zip "$FILE" "$DIR"
|
2011-02-06 09:18:43 +01:00
|
|
|
rm -rf "$DIR"
|
|
|
|
echo "Packaged into $FILE !"
|