summaryrefslogtreecommitdiffstats
path: root/util/gen-git-tarball
diff options
context:
space:
mode:
Diffstat (limited to 'util/gen-git-tarball')
-rwxr-xr-xutil/gen-git-tarball17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/gen-git-tarball b/util/gen-git-tarball
new file mode 100755
index 0000000..a959c4a
--- /dev/null
+++ b/util/gen-git-tarball
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Generate the e2fsprogs release tar ball
+#
+
+commit=HEAD
+
+if test -n "$1" ; then
+ commit="$1"
+fi
+
+ver=`git show ${commit}:version.h | grep E2FSPROGS_VERSION \
+ | awk '{print $3}' | tr \" " " | awk '{print $1}'`
+fn=e2fsprogs-${ver}.tar.gz
+
+git archive --prefix=e2fsprogs-${ver}/ ${commit} | gzip -9n > $fn
+echo "Generated $fn"