diff --git a/.gitignore b/.gitignore index 3a696efc..c0c091a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /build* +/libdeflate-*-windows-* +/libdeflate-*.tar.gz cscope* tags diff --git a/scripts/gen-tarball.sh b/scripts/gen-tarball.sh new file mode 100755 index 00000000..7ef43b3b --- /dev/null +++ b/scripts/gen-tarball.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Generate a source tarball from the git repository. + +commit=HEAD +prefix="libdeflate-$(git describe $commit | sed 's/^v//')" +tarball="${prefix}.tar.gz" + +git archive --format=tar --prefix="${prefix}/" "$commit" \ + | libdeflate-gzip -12 > "$tarball" +echo "Generated $tarball"