annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c12a8dda22bb Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #!/bin/sh
38
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
2 . ./build.cfg
0
c12a8dda22bb Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 CPWD=`pwd`
38
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
4 CPACKED="$CPWD/packed.bin"
11
a712382dcf6a Improve data blob building.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
5
38
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
6 if test ! -x "$CPACKED"; then
11
a712382dcf6a Improve data blob building.
Matti Hamalainen <ccr@tnsp.org>
parents: 5
diff changeset
7 make -f Makefile clean
38
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
8 make -f Makefile EXEEXT=".bin" BINPATH="$CPWD" "$CPACKED"
0
c12a8dda22bb Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 fi
c12a8dda22bb Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
38
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
11 cd "$CPWD/data" && $CPACKED -c -p "$CPWD/exe/$CPACKFILE" *
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
12
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
13 if test ! -e "$CPWD/$CPACKFILE"; then
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
14 ln -s "$CPWD/exe/$CPACKFILE" "$CPWD/$CPACKFILE"
ea2d19de8932 Improve package building process.
Matti Hamalainen <ccr@tnsp.org>
parents: 12
diff changeset
15 fi