From 4fddec79c7c3cc148b157146c9346abba2843f73 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 5 Mar 2014 15:10:28 +0200 Subject: Add dist script --- dist.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 dist.sh diff --git a/dist.sh b/dist.sh new file mode 100755 index 0000000..2ace25d --- /dev/null +++ b/dist.sh @@ -0,0 +1,36 @@ +#! /usr/bin/env bash + +trap 'exit 1' ERR + +v=`cat libxsd-frontend/version` + +echo "packaging libxsd-frontend-$v" +echo "EVERYTHING MUST BE COMMITTED!" + +# prepare libxsd-frontend-x.y.z +# +rm -rf libxsd-frontend-$v +mkdir libxsd-frontend-$v +cd libxsd-frontend +git archive master | tar -x -C ../libxsd-frontend-$v +cd .. +rm -f libxsd-frontend-$v/.gitignore + +# Copy generated source files. +# +cd libxsd-frontend/xsd-frontend +make + +files="semantic-graph/fundamental.?xx" + +for f in $files; do + rsync -aq $f ../../libxsd-frontend-$v/xsd-frontend/$f + touch ../../libxsd-frontend-$v/xsd-frontend/$f +done + +cd ../.. + +# Package +# +tar cfj libxsd-frontend-$v.tar.bz2 libxsd-frontend-$v +sha1sum libxsd-frontend-$v.tar.bz2 >libxsd-frontend-$v.tar.bz2.sha1 -- cgit v1.1