[PATCH] Document config.mak in INSTALL.
[alt-git.git] / git-verify-tag.sh
blob1f44da53496e880395286dafb431b9c3095df9f1
1 #!/bin/sh
3 GIT_DIR=`git-rev-parse --git-dir` || exit $?
5 die () {
6 echo >&2 "$*"
7 exit 1
10 type="$(git-cat-file -t "$1" 2>/dev/null)" ||
11 die "$1: no such object."
13 test "$type" = tag ||
14 die "$1: cannot verify a non-tag object of type $type."
16 git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
17 cat "$GIT_DIR/.tmp-vtag" |
18 sed '/-----BEGIN PGP/Q' |
19 gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1
20 rm -f "$GIT_DIR/.tmp-vtag"