summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-07-26 14:23:37 +0200
committerTor Andersson <tor.andersson@artifex.com>2013-07-26 14:23:37 +0200
commitd812f7ca3a2d1f87b18d6583dad4abfc9d01b3ae (patch)
treedf191269b22be30f5edca39e3b276648a3e25683 /scripts
parent98f7bb73113424f8a7e5163185962d9a49e0b9f1 (diff)
downloadmupdf-d812f7ca3a2d1f87b18d6583dad4abfc9d01b3ae.tar.xz
Add script to create source tarballs using git-archive.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/archive.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/archive.sh b/scripts/archive.sh
new file mode 100644
index 00000000..0a6e8b3d
--- /dev/null
+++ b/scripts/archive.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+REV=$(git describe --tags)
+O=mupdf-$REV-source
+
+echo git archive $O.tar
+git archive --format=tar --prefix=$O/ HEAD > $O.tar
+
+git submodule | while read R P T
+do
+ M=$(basename $P)
+ echo git archive $O.$M.tar
+ git archive --format=tar --remote=$P --prefix=$O/$P/ HEAD > $O.$M.tar
+ tar Af $O.tar $O.$M.tar
+ rm -f $O.$M.tar
+done
+
+echo gzip $O.tar
+gzip -f $O.tar