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