summaryrefslogtreecommitdiff
path: root/binary/pack
diff options
context:
space:
mode:
Diffstat (limited to 'binary/pack')
-rwxr-xr-xbinary/pack55
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/