2010-08-06 22:03:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DATE=`date +%d.%m.%Y`
|
2010-11-19 19:58:02 +01:00
|
|
|
ARCH=`uname -m`
|
2010-12-03 19:21:08 +01:00
|
|
|
VERSION=`cat src/controller/KissCount.h | grep APP_VERSION | cut -d\" -f2`
|
|
|
|
DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}"
|
2010-08-06 22:03:53 +02:00
|
|
|
FILE="$DIR.tar.bz2"
|
|
|
|
|
2011-01-06 18:33:26 +01:00
|
|
|
rm -f "$FILE"
|
|
|
|
rm -rf "$DIR"
|
2010-08-20 21:33:59 +02:00
|
|
|
if [ "$1" == "clean" ] ; then
|
2010-08-06 22:03:53 +02:00
|
|
|
make clean
|
2010-08-20 21:33:59 +02:00
|
|
|
fi
|
2010-08-06 22:03:53 +02:00
|
|
|
make || (echo "Compilation failed" ; exit 1)
|
2011-01-06 18:33:26 +01:00
|
|
|
mkdir -p "$DIR"/lib
|
|
|
|
cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DIR"/lib
|
|
|
|
cp -r kc init.sql ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr www "$DIR"
|
|
|
|
find "$DIR" -type f -executable -exec strip \{\} \;
|
|
|
|
tar -jcf "$FILE" "$DIR"
|
|
|
|
rm -rf "$DIR"
|
2010-08-06 22:03:53 +02:00
|
|
|
echo "Packaged !"
|