summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--scripts/archive.sh19
2 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2e72fbe4..306544a2 100644
--- a/Makefile
+++ b/Makefile
@@ -303,6 +303,9 @@ install: libs apps
install -d $(DESTDIR)$(docdir)
install README COPYING CHANGES docs/*.txt $(DESTDIR)$(docdir)
+tarball:
+ bash scripts/archive.sh
+
# --- Clean and Default ---
tags: $(shell find include source -name '*.[ch]')
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