X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere;h=6db4827c15a5ea8fc9248cf2a4c1e0f9e6cd5d79;hb=e71c7bb4dff26178f714cd0fcdbb3058effa4066;hp=b30453ca0ff46277b0d70ee23f39bdda5d59473d;hpb=ff8383ce9092335de6c00447bb45a2a7fbbf8685;p=monkeysphere.git diff --git a/src/monkeysphere b/src/monkeysphere index b30453c..6db4827 100755 --- a/src/monkeysphere +++ b/src/monkeysphere @@ -12,6 +12,8 @@ # or later. ######################################################################## +set -e + PGRM=$(basename $0) SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"} @@ -85,9 +87,7 @@ check_gpg_sec_key_id() { ;; *) echo "Multiple primary secret keys found:" - for key in $(echo "$gpgSecOut" | cut -d: -f5) ; do - echo " $key" - done + echo "$gpgSecOut" | cut -d: -f5 echo "Please specify which primary key to use." failure ;; @@ -122,7 +122,7 @@ check_gpg_authentication_subkey() { fi # if authentication key is valid, prompt to continue if [ "$validity" = 'u' ] ; then - echo "A valid authentication key already exists for primary key '$keyID'." + echo "A valid authentication key already exists for primary key '$keyID'." 1>&2 if [ "$PROMPT" = "true" ] ; then read -p "Are you sure you would like to generate another one? (y/N) " OK; OK=${OK:N} if [ "${OK/y/Y}" != 'Y' ] ; then @@ -239,7 +239,7 @@ case $COMMAND in ;; 'version'|'v') - echo "$VERSION" + version ;; '--help'|'help'|'-h'|'h'|'?') @@ -251,5 +251,3 @@ case $COMMAND in Type '$PGRM help' for usage." ;; esac - -exit "$RETURN"