summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-07-11 12:24:02 -0400
committerTheodore Ts'o <tytso@mit.edu>2019-07-11 12:24:02 -0400
commit71b499538b24738c8af985849f611bc7e4f56321 (patch)
treee9fe18deabac052d66ffd74703dd6046c01ef923
parent336ac184836e8cadc6b3800fc1fc0851f24a91cc (diff)
downloade2fsprogs-71b499538b24738c8af985849f611bc7e4f56321.tar.gz
util: add a script gen-git-tarball to generate a release tarball from git
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-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 00000000..a959c4a9
--- /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"