From 9066f726f9e6e6eaaa8abd15d4574db7c74425b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Wi=C3=9Fmann?= <uni@thorsten-wissmann.de> Date: Wed, 16 Jul 2014 15:35:04 +0200 Subject: [PATCH] Add script for static tarball creation --- makestatic.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 makestatic.sh diff --git a/makestatic.sh b/makestatic.sh new file mode 100755 index 0000000..e6a7fee --- /dev/null +++ b/makestatic.sh @@ -0,0 +1,62 @@ +#!/bin/bash + + +::() { echo ":: $*" ; "$@" ; } +die() { echo "$*" ; exit 1 ; } + +[ -d .git ] || die "$0 only works in the git-repository!" + +dir=cool-$(uname -m)-$(date +%Y-%m-%d) +:: mkdir -p $dir +:: pushd $dir +:: git --git-dir=.git pull || :: git clone .. . + +make clean +oasis setup +ocaml setup.ml -configure --enable-static +ocaml setup.ml -build + +files=( +) + +binary() { + files+=( "$1" ) + cp $1.native $1 +} + +binary coalg +binary cool-testsuite +binary coalgcompare +binary cool-owl + +files+=( + *.sh + BUGS + INSTALL + VERSION + _oasis + benchmarks/ + testbench/ + cool2tatl + setup.ml + src/ +) + +cat >VERSION <<EOF +COOL Static Linux-Binaries +========================== +This version of COOL was... + - build on $(date). + - build for the architecture $(uname -m). + + +Last commit +----------- +$(git log HEAD~1..) + +EOF + +popd + +zip -r "$dir.zip" $(printf "$dir/%s\n" "${files[@]}") + -- GitLab