summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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