view build-data.sh @ 38:ea2d19de8932

Improve package building process.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 13 Oct 2012 16:58:29 +0300
parents 4bfeef9f361a
children 9cbb03e85597
line wrap: on
line source

#!/bin/sh
. ./build.cfg
CPWD=`pwd`
CPACKED="$CPWD/packed.bin"

if test ! -x "$CPACKED"; then
	make -f Makefile clean
	make -f Makefile EXEEXT=".bin" BINPATH="$CPWD" "$CPACKED"
fi

cd "$CPWD/data" && $CPACKED -c -p "$CPWD/exe/$CPACKFILE" *

if test ! -e "$CPWD/$CPACKFILE"; then
	ln -s "$CPWD/exe/$CPACKFILE" "$CPWD/$CPACKFILE"
fi