all tests pass again

This commit is contained in:
Lance Vick 2023-01-12 15:10:04 -08:00
parent 48c15ce1ce
commit 2a7b8ac666
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 23 additions and 16 deletions

39
sig
View File

@ -378,13 +378,20 @@ verify(){
fi
if [ -z "$method" ] || [ "$method" == "detached" ]; then
( [ -d ".${PROGRAM}" ] && ls ."${PROGRAM}"/*.asc >/dev/null 2>&1 ) || {
echo "Error: No signatures";
return 1;
}
cmd_manifest || return 1
verify_detached "${threshold}" "${group}" ."${PROGRAM}"/manifest.txt \
|| return 1
if [ "$method" == "detached" ]; then
( [ -d ".${PROGRAM}" ] && ls ."${PROGRAM}"/*.asc >/dev/null 2>&1 \
) || {
echo "Error: method 'detached' and no signatures found";
return 1;
}
fi
if ( \
[ -d ".${PROGRAM}" ] && ls ."${PROGRAM}"/*.asc >/dev/null 2>&1 \
); then
cmd_manifest || return 1;
verify_detached "${threshold}" "${group}" ."${PROGRAM}"/manifest.txt \
|| return 1;
fi
fi
}
@ -497,8 +504,8 @@ cmd_fetch() {
}
cmd_add(){
local opts method="" push=0
opts="$(getopt -o m:p:: -l method:push:: -n "$PROGRAM" -- "$@")"
local opts method="" push="0"
opts="$(getopt -o m:p:: -l method:,push:: -n "$PROGRAM" -- "$@")"
eval set -- "$opts"
while true; do case $1 in
-m|--method) method="$2"; shift 2 ;;
@ -521,13 +528,13 @@ cmd_add(){
cmd_version() {
cat <<-_EOF
==========================================
= sig: simple multisig trust toolchain =
= =
= v0.0.1 =
= =
= https://gitlab.com/pchq/sig =
==========================================
==============================================
= sig: simple multisig trust toolchain =
= =
= v0.0.1 =
= =
= https://github.com/distrust-foundation/sig =
==============================================
_EOF
}