lib: fixed stream output bug in HexDumpParser
[barry.git] / maintainer / abi / abi-prepare.sh
blobf979bafb61b51fe6f4217d4b6bf76a8221a7f48b
1 #!/bin/sh
3 fullpath() {
4 cd "$(dirname "$1")"
5 echo "$(pwd)/$(basename "$1")"
8 if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
9 echo "Usage: abi-prepare.sh tarball abi.xml configure.sh"
10 exit 1
13 TARBALL="$1"
14 XML="$2"
15 CONFIG="$3"
16 VERSION="$(grep -A 1 '<version>' "$XML" | grep -v version | sed "s/^[ ]//")"
18 FULLXML="$(fullpath "$XML")"
19 FULLCONFIG="$(fullpath "$CONFIG")"
21 # enable errors
22 set -e
24 # create target playspace
25 echo "Creating source tree..."
26 mkdir "/tmp/$VERSION" # make sure it doesn't already exist
27 mkdir -p "/tmp/$VERSION/rootdir"
28 tar -C "/tmp/$VERSION" -xjf "$TARBALL"
30 # build and install
31 echo "Installing to: /tmp/$VERSION/rootdir..."
32 cd "/tmp/$VERSION/barry-$VERSION"
33 "$FULLCONFIG" --prefix="/tmp/$VERSION/rootdir"
34 make -j2
35 make install