swap sed for awk for fingerprint match as MacOS sed was frozen in 2005 and parses regex differently

This commit is contained in:
Lance Vick 2020-12-07 22:01:17 -08:00
parent ed0b58c05f
commit fa11769b7b
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 7 additions and 7 deletions

12
sig
View File

@ -290,7 +290,7 @@ verify_git(){
git_fp=$( \
git verify-tag --raw "$tag" 2>&1 \
| grep VALIDSIG \
| sed 's/.*VALIDSIG \([A-Z0-9]\+\).*/\1/g' \
| awk '{print $3}' \
)
fp=$(get_primary_fp "$git_fp")
uid=$( get_uid "${fp}" )
@ -497,7 +497,7 @@ cmd_fetch() {
}
cmd_add(){
local opts method="default" push=0
local opts method="" push=0
opts="$(getopt -o m:p:: -l method:push:: -n "$PROGRAM" -- "$@")"
eval set -- "$opts"
while true; do case $1 in
@ -506,16 +506,16 @@ cmd_add(){
--) shift; break ;;
esac done
case $method in
default)
detached) sign_detached ;;
git) sign_tag "$push" ;;
*)
[ ! -z "$push" ] || cmd_usage
if [ -d '.git' ]; then
sign_tag "$push"
else
sign_detached
fi
;;
detached) sign_detached ;;
git) sign_tag "$push" ;;
*) cmd_usage ;;
esac
}