summaryrefslogtreecommitdiffstats
path: root/scripts/make-archive.sh
blob: 4a66f17f9953e3c13156d3648bc24b656582e0a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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"