path: root/support
diff options
authorMatthias Braun <>2016-01-07 08:50:38 +0100
committerMatthias Braun <>2016-01-07 08:50:38 +0100
commit6bfa9d5d7283bd9cb465397ee6e8a4c45a9f3c86 (patch)
tree765ba6d59eafd79584f12c6aa9aa3bad15ad2985 /support
parent79e869bb1dd10833a657d720f1ddbef609d3baed (diff)
Move to support dir
Diffstat (limited to 'support')
1 files changed, 47 insertions, 0 deletions
diff --git a/support/ b/support/
new file mode 100755
index 0000000..4d49c68
--- /dev/null
+++ b/support/
@@ -0,0 +1,47 @@
+set -eu
+if ! test -e .git; then
+ echo "Must be started from toplevel cparser dir"
+ exit 1
+# Check that our git checkout is clean (remember that we use git archive
+# which will miss things uncommitted changes)
+if [ "$(git status --porcelain)" != "" ]; then
+ echo "Git checkout not clean!"
+ exit 1
+# test if versions match
+echo "Checking version in $VERSIONFILE"
+egrep -q "#define CPARSER_MAJOR\\s*\"$VERSION_MAJOR\"" "$VERSIONFILE"
+egrep -q "#define CPARSER_MINOR\\s*\"$VERSION_MINOR\"" "$VERSIONFILE"
+echo "Checking version in CMakeLists.txt"
+grep -q "set(cparser_VERSION \"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}\")" CMakeLists.txt
+echo "Checking version in config.default.mak"
+egrep -q "VERSION\\s*=\\s*$VERSION_MAJOR\\.$VERSION_MINOR\\.$VERSION_MICRO" config.default.mak
+echo "Checking version in"
+echo "creating $RELEASEBZ2"
+mkdir -p "$(dirname "$RELEASEBZ2")"
+git archive --prefix cparser-$VERSION/ HEAD | bzip2 -9 > "$RELEASEBZ2"
+echo "creating $RELEASEGZ"
+mkdir -p "$(dirname "$RELEASEGZ")"
+git archive --prefix cparser-$VERSION/ HEAD | gzip -9 > "$RELEASEGZ"
+echo "creating $RELEASEXZ"
+mkdir -p "$(dirname "$RELEASEXZ")"
+git archive --prefix cparser-$VERSION/ HEAD | xz -9 > "$RELEASEXZ"