summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-03-05 15:10:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-03-05 15:10:28 +0200
commit4fddec79c7c3cc148b157146c9346abba2843f73 (patch)
tree9dfe03977fbffdb5a547c717a0b89f6df2675f8a
Add dist scriptHEADmaster
-rwxr-xr-xdist.sh36
1 files changed, 36 insertions, 0 deletions
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