From 7dbd6806e538ff8732dd87fcf20bfd8271464552 Mon Sep 17 00:00:00 2001 From: Jameson Rollins Date: Mon, 18 Jan 2010 18:38:27 -0500 Subject: canonicalize prompting to prompt if MONKEYSPHERE_PROMPT != 'false' --- src/share/mh/add_name | 2 +- src/share/mh/publish_key | 2 +- src/share/mh/revoke_name | 2 +- src/share/mh/set_expire | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/share/mh') diff --git a/src/share/mh/add_name b/src/share/mh/add_name index 754ced4..39ebace 100644 --- a/src/share/mh/add_name +++ b/src/share/mh/add_name @@ -39,7 +39,7 @@ prompt_userid_exists "$serviceName" check_service_name "$serviceName" -if [ "$PROMPT" = "true" ] ; then +if [ "$PROMPT" != "false" ] ; then printf "The following service name will be added to key '$keyID':\n %s\nAre you sure you would like to add this service name? (Y/n) " "$serviceName" >&2 read OK; OK=${OK:=Y} if [ "${OK/y/Y}" != 'Y' ] ; then diff --git a/src/share/mh/publish_key b/src/share/mh/publish_key index 553cd72..f1c1723 100644 --- a/src/share/mh/publish_key +++ b/src/share/mh/publish_key @@ -18,7 +18,7 @@ publish_key() { local keyID="$1" local GNUPGHOME -if [ "$PROMPT" = "true" ] ; then +if [ "$PROMPT" != "false" ] ; then printf "Really publish key '$keyID' to $KEYSERVER? (Y/n) " >&2 read OK; OK=${OK:=Y} if [ "${OK/y/Y}" != 'Y' ] ; then diff --git a/src/share/mh/revoke_name b/src/share/mh/revoke_name index 7788327..532cb30 100644 --- a/src/share/mh/revoke_name +++ b/src/share/mh/revoke_name @@ -35,7 +35,7 @@ keyID=$(check_key_input "$@") check_key_userid "$keyID" "$serviceName" || \ failure "No non-revoked service name found matching '$serviceName'." -if [ "$PROMPT" = "true" ] ; then +if [ "$PROMPT" != "false" ] ; then printf "The following service name on key '$keyID' will be revoked:\n %s\nAre you sure you would like to revoke this service name? (Y/n) " "$serviceName" >&2 read OK; OK=${OK:=Y} if [ "${OK/y/Y}" != 'Y' ] ; then diff --git a/src/share/mh/set_expire b/src/share/mh/set_expire index be3f6bb..68a8dfd 100644 --- a/src/share/mh/set_expire +++ b/src/share/mh/set_expire @@ -35,7 +35,7 @@ shift keyID=$(check_key_input "$@") -if [ "$PROMPT" = "true" ] ; then +if [ "$PROMPT" != "false" ] ; then printf "Are you sure you want to change the expiration on key '$keyID' by '%s'? (Y/n) " "$extendBy" >&2 read OK; OK=${OK:-Y} if [ "${OK/y/Y}" != 'Y' ] ; then -- cgit v1.2.3