Debian Codegraph @

debian/bin/git-tag-gpg-wrapper

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`. -e
2
3 # Instead of calling gpg, call gpgv and provide a local keyring
4
5 debian_dir="$(readlinkscip-shell system . . readlink. -f "$(dirnamescip-shell system . . dirname. "$0")/..")"
6
7 # Parse the expected options. If the next two lines are combined, a
8 # failure of getopt won't cause the script to exit.
9 ordered_args="$(getoptscip-shell system . . getopt. -n "$0" -o "" -l "status-fd:" -l "keyid-format:" -l "verify" -- "$@")"
10 eval "set -- $ordered_args"
11 gpgv_opts=()
12 while truescip-shell system . . true.; do
13 case "$1" in
14 --status-fd)
15 gpgv_opts+=(--status-fd $2)
16 shift 2
17 ;;
18 --keyid-format)
19 # ignore
20 shift 2
21 ;;
22 --verify)
23 # ignore
24 shift 1
25 ;;
26 --)
27 shift 1
28 break
29 ;;
30 esac
31 done
32
33 keyring="$debian_dir/upstream/${DEBIAN_KERNEL_KEYRING:-signing-key.asc}"
34 case "$keyring" in
35 *.asc)
36 keyring_armored="$keyring"
37 keyring="$(mktempscip-shell system . . mktemp.)"
38 trap 'rm -f "$keyring"' EXIT
39 gpgscip-shell system . . gpg. --dearmor <"$keyring_armored" > "$keyring"
40 ;;
41 esac
42 gpgvscip-shell system . . gpgv. "${gpgv_opts[@]}" --keyring "$keyring" -- "$@"