diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
commit | 3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch) | |
tree | f87bd4a126b3a843858eb447e8fd5893c3ee3882 /scripts/make-archive.sh | |
parent | Initial commit. (diff) | |
download | knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/make-archive.sh')
-rwxr-xr-x | scripts/make-archive.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/make-archive.sh b/scripts/make-archive.sh new file mode 100755 index 0000000..e3b1a97 --- /dev/null +++ b/scripts/make-archive.sh @@ -0,0 +1,15 @@ +#!/bin/sh -e +# Create a distribution tarball, like 'make dist' from autotools. +cd "$(git rev-parse --show-toplevel)" +ver=$(git describe | sed 's/^v//' | sed 's/-/\./g') +test 0 -ne $(git status --porcelain | wc -l) && \ + echo "Git working tree is dirty, make it clean first" && \ + exit 1 +git submodule status --recursive | grep -q '^[^ ]' && \ + echo "Git submodules are dirty, run: git submodule update --recursive --init" && \ + exit 2 + +# 'git ls-files --recurse-submodules' works only if modules are initialized +name="knot-resolver-$ver" +tar caf "$name.tar.xz" -h --no-recursion --transform "s|^|$name/|" -- $(git ls-files --recurse-submodules) +echo "$name.tar.xz" |