From d812f7ca3a2d1f87b18d6583dad4abfc9d01b3ae Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 26 Jul 2013 14:23:37 +0200 Subject: Add script to create source tarballs using git-archive. --- Makefile | 3 +++ scripts/archive.sh | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 scripts/archive.sh 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 -- cgit v1.2.3