summaryrefslogtreecommitdiffstats
path: root/scripts/make-archive.sh
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2017-08-01 11:06:13 +0200
committerVladimír Čunát <vladimir.cunat@nic.cz>2017-08-01 11:06:13 +0200
commitf16a04ab16e64f538a2ce94a91663c005853165b (patch)
tree7c94676418db40a6756c3c69ffa5fec3a8519726 /scripts/make-archive.sh
parentpolicy aho-corasick: makefile tweaks (diff)
downloadknot-resolver-f16a04ab16e64f538a2ce94a91663c005853165b.tar.xz
knot-resolver-f16a04ab16e64f538a2ce94a91663c005853165b.zip
add scripts/make-archive.sh
as 'git archive' won't include the submodule with aho-corasick code
Diffstat (limited to 'scripts/make-archive.sh')
-rwxr-xr-xscripts/make-archive.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/make-archive.sh b/scripts/make-archive.sh
new file mode 100755
index 00000000..4a66f17f
--- /dev/null
+++ b/scripts/make-archive.sh
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+# Create a distribution tarball, like 'make dist' from autotools.
+ver="$(git describe | sed 's/^v//')"
+# 'git ls-files --recurse-submodules' fails, unfortunately
+files="$(
+ git ls-files
+ cd modules/policy/lua-aho-corasick/
+ git ls-files | sed 's|^|modules/policy/lua-aho-corasick/|'
+ )"
+name="knot-resolver-$ver"
+tar caf "$name.tar.xz" --no-recursion --transform "s|^|$name/|" -- $files
+echo "$name.tar.xz"
+