What's cooking (2014/09 #02)
[alt-git.git] / RelBuild
blob27b7460a9bed22243c0e1d374b9d79f505d3df4a
1 #!/bin/sh
3 j="-j 8"
4 version=$(git describe --exact) &&
5 label=$(echo "$version" | sed -e 's|^v||') &&
6 version=$(echo "$label" | sed -e 's|-|.|g') || exit
8 make clean && make $j CFLAGS="-O2 -Wno-format-zero-length" dist &&
10 ASCIIDOC_NO_ROFF=YesPlease \
11 ASCIIDOC8=YesPlease \
12 MAN_BASE_URL="git-htmldocs/" \
13 make $j dist-doc || exit
14 # The above used to be
15 # MAN_BASE_URL="http://www.kernel.org/pub/software/scm/git/docs/"
17 files="
18 git-$version.tar.gz
19 git-htmldocs-$version.tar.gz
20 git-manpages-$version.tar.gz
23 for file in $files
25 test -f $file || exit
26 done
28 # Use agent
29 GPG_TTY=$(tty) &&
30 export GPG_TTY &&
31 eval $(gpg-agent --daemon) &&
32 GPG_AGENT_PID=$(expr "$GPG_AGENT_INFO" : ".*:\([1-9][0-9]*\):[1-9][0-9]*$") &&
33 trap 'kill -0 2>/dev/null $GPG_AGENT_PID && kill $GPG_AGENT_PID' 0 1 2 3 15 &&
34 kill -0 "$GPG_AGENT_PID" &&
35 gpg="gpg --use-agent" || exit
37 sha1sum $files | $gpg --clearsign >git-$version.sign || exit
39 for file in $files
41 gzip -dc <"$file" >"${file%.gz}" &&
42 $gpg -b "${file%.gz}" &&
43 rm "${file%.gz}" || exit
44 done
46 kill $GPG_AGENT_PID
47 ls -l git-$version.sign $files git*-$version.tar.sig