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