KissCount

KissCount Git Source Tree

Root/tools/package.sh

1#!/bin/bash
2
3DATE=`date +%d.%m.%Y`
4ARCH=`${PREFIX}gcc -dumpmachine | cut -d- -f1`
5VERSION=`cat src/controller/KissCount.h | grep APP_VERSION | cut -d\" -f2`
6DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}"
7FILE="$DIR.tar.bz2"
8
9rm -f "$FILE"
10rm -rf "$DIR"
11if [ "$1" == "clean" ] ; then
12make clean
13fi
14make || (echo "Compilation failed" ; exit 1)
15mkdir -p "$DIR"/lib
16cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DIR"/lib
17cp -r kc init.sql ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr www "$DIR"
18find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \;
19tar -jcf "$FILE" "$DIR"
20rm -rf "$DIR"
21echo "Packaged into $FILE !"

Archive Download this file