diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-15 09:04:02 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-15 09:04:02 +0200 |
commit | 340ee4f40791d16ab778a473788c1a0645b83993 (patch) | |
tree | 6994938a3bd7b5d9dc1d823ee0b225af44f0a6ed /binary/pack | |
parent | 0c0424b4f321a90028b12beb8959de707224e45e (diff) |
Add binary packaging and test scripts
Diffstat (limited to 'binary/pack')
-rwxr-xr-x | binary/pack | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/binary/pack b/binary/pack new file mode 100755 index 0000000..57cce4e --- /dev/null +++ b/binary/pack @@ -0,0 +1,55 @@ +#! /usr/bin/env bash + +# Pack ODB compiler sources and build scripts for building and testing a +# binary. +# +# Usage: pack <platform> +# +# <platforms> is one of: linux-gnu, darwin, solaris +# +# +trap 'exit 1' ERR + +function error () +{ + echo "$*" 1>&2 +} + +if [ "$1" = "" ]; then + error "Usage: $0 platform" + exit 1 +fi + +platform=$1 + +src=/tmp + +cver=`echo $src/libcutl-?.*.tar.gz | sed -e "s%$src/libcutl-\(.*\).tar.gz%\1%"` +over=`echo $src/pack/odb-?.*.tar.gz | sed -e "s%$src/pack/odb-\(.*\).tar.gz%\1%"` +mver=`echo $over | sed -e 's%\([0-9]*\.[0-9]*\).*%\1%'` + +out=/tmp/pack-$platform-$over + +# Clean everything up. +# +rm -rf $out +mkdir -p $out + +# Copy scripts. +# +cp -rL $platform/* $out/ + +# Copy sources for binary build. +# +cp $src/libcutl-$cver.tar.gz $out/ +cp $src/pack/odb-$over.tar.gz $out/ +cp $src/pack/libodb-$mver.*.tar.gz $out/ +cp $src/pack/libodb-boost-$mver.*.tar.gz $out/ +cp $src/pack/libodb-qt-$mver.*.tar.gz $out/ + +# Copy sources for testing. +# +cp $src/pack/lib*-$mver.*.tar.bz2 $out/test/ +cp $src/pack/odb-examples-$mver.*.tar.bz2 $out/test/ +cp $src/pack/odb-tests-$mver.*.tar.bz2 $out/test/ +cp ./build-test $out/test/ |