diff options
| -rwxr-xr-x | bin/ak-gpg | 2 | ||||
| -rwxr-xr-x | lib/_ak_gpg | 8 | 
2 files changed, 6 insertions, 4 deletions
| @@ -44,6 +44,7 @@  ##    -d, --delete-key                    Delete GPG keys from your keyring  ##    -ds, --delete-secret-key <fingerprint>  ##                                        Delete GPG keys from your keyring +##    -r, --run                           Runs a command with gpg2  ##  fullprogrampath="$(realpath $0)"  PROGRAM=$(basename $0) @@ -77,6 +78,7 @@ if [ ! -z $1 ]; then          --select-key | -s) _ak_gpg_select_key; exit;;          --delete-key | -d) _ak_gpg_delete_key; exit;;          --delete-secret-key | -ds) shift; _ak_gpg_delete_secret_key $1; exit;; +        --run | -r) shift; _ak_gpg $*; exit;;          * ) _ak_usage;;      esac  else _ak_usage diff --git a/lib/_ak_gpg b/lib/_ak_gpg index bdb8829..c8cc669 100755 --- a/lib/_ak_gpg +++ b/lib/_ak_gpg @@ -136,7 +136,7 @@ function _ak_gpg_sign_clear(){  function _ak_gpg_encrypt_sign(){      if [ ! -z $1 ] && [ -n "$1" ] && [ ! -z $2 ] && [ -n "$2" ] && [ ! -z $3 ] && [ -n "$3" ]      then -        _ak_gpg --sign-with $AK_FINGERPRINT --encypt -r $3 --armor --output $1 $2 +        _ak_gpg --sign-with $AK_FINGERPRINT --encrypt -r $3 --armor --output $1 $2      else          exit 1      fi @@ -145,7 +145,7 @@ function _ak_gpg_encrypt_sign(){  function _ak_gpg_encrypt_sign_for_self(){      if [ ! -z $1 ] && [ -n "$1" ] && [ ! -z $2 ] && [ -n "$2" ]      then -        _ak_gpg --sign-with $AK_FINGERPRINT --encypt -r $AK_FINGERPRINT --armor --output $1 $2 +        _ak_gpg --sign-with $AK_FINGERPRINT --encrypt -r $AK_FINGERPRINT --armor --output $1 $2      else          exit 1      fi @@ -154,7 +154,7 @@ function _ak_gpg_encrypt_sign_for_self(){  function _ak_gpg_encrypt(){      if [ ! -z $1 ] && [ -n "$1" ] && [ ! -z $2 ] && [ -n "$2" ] && [ ! -z $3 ] && [ -n "$3" ]      then -        _ak_gpg --encypt -r $3 --armor --output $1 $2 +        _ak_gpg --encrypt -r $3 --armor --output $1 $2      else          exit 1      fi @@ -163,7 +163,7 @@ function _ak_gpg_encrypt(){  function _ak_gpg_encrypt_for_self(){      if [ ! -z $1 ] && [ -n "$1" ] && [ ! -z $2 ] && [ -n "$2" ]      then -        _ak_gpg --encypt -r $AK_FINGERPRINT --armor --output $1 $2 +        _ak_gpg --encrypt -r $AK_FINGERPRINT --armor --output $1 $2      else          exit 1      fi | 
