From 40bcf4cb4cafb91105824e46632e52c98298804b Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Mon, 16 Dec 2019 16:43:25 +0100 Subject: [PATCH] Updated makedist.sh --- project-doc/makedist.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/project-doc/makedist.sh b/project-doc/makedist.sh index b71fe3a7..55816195 100755 --- a/project-doc/makedist.sh +++ b/project-doc/makedist.sh @@ -2,9 +2,20 @@ [ ! -f git-archive-all.sh ] && wget "https://raw.githubusercontent.com/meitar/git-archive-all.sh/master/git-archive-all.sh" [ ! -x git-archive-all.sh ] && chmod +x git-archive-all.sh +[ ! -f git-archive-all.sh ] && exit 1 +GIT_ARCHIVE="`pwd`/git-archive-all.sh" +git submodule update --init +GIT_ROOT=`git rev-parse --show-toplevel` version=`awk '/^set\(PACKAGE_VERSION/{V=$2} /^set\(RELEASE_CANDIDATE/{RC=$2} - END{print V""RC}' CMakeLists.txt | sed 's/[")]//g'` + END{print V""RC}' "$GIT_ROOT/CMakeLists.txt" | sed 's/[")]//g'` output_file="getdns-${version}.tar.gz" -./git-archive-all.sh --prefix "getdns-$version/" --format tar.gz --worktree-attributes "getdns-$version.tar.gz" - +( cd "$GIT_ROOT" \ + && "$GIT_ARCHIVE" --prefix "getdns-$version/" --format tar.gz \ + --worktree-attributes -- - ) > "$output_file" +openssl md5 "$output_file" > "${output_file}.md5" +openssl sha1 "$output_file" > "${output_file}.sha1" +openssl sha256 "$output_file" > "${output_file}.sha256" +gpg --armor --detach-sig "$output_file" +[ -f "$output_file" -a -f "${output_file}.md5" -a -f "${output_file}.sha1" -a -f "${output_file}.sha256" -a -f "${output_file}.asc" ] \ +&& rm git-archive-all.sh