diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-09-18 12:40:56 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-09-18 12:40:56 -0300 |
commit | 4d85c40d8ac5140835c5f75d513f886ae5910da9 (patch) | |
tree | fb26d4de4ed2f4ea40f1cd259d5a70baba07469a /share/keyringer/decrypt | |
parent | 8d8ceaebb92cb5036c81cc39f711ce72bb942a8d (diff) | |
download | keyringer-4d85c40d8ac5140835c5f75d513f886ae5910da9.tar.gz keyringer-4d85c40d8ac5140835c5f75d513f886ae5910da9.tar.bz2 |
Making code that checks for file argument as a common function
Diffstat (limited to 'share/keyringer/decrypt')
-rwxr-xr-x | share/keyringer/decrypt | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/share/keyringer/decrypt b/share/keyringer/decrypt index cb1d35b..71367f5 100755 --- a/share/keyringer/decrypt +++ b/share/keyringer/decrypt @@ -8,15 +8,7 @@ LIB="`dirname $0`/../../lib/keyringer/functions" source $LIB keyringer_set_env $* -# Aditional parameters -FILE="`keyringer_filename $2`" - -if [ -z "$FILE" ]; then - echo "Usage: keyringer <keyring> `basename $0` <file>" - exit 1 -elif [ ! -f "$KEYDIR/$FILE" ]; then - echo "File not found: $KEYDIR/$FILE" - exit 1 -fi +# Get file +keyringer_get_file $2 gpg --quiet --use-agent -d $KEYDIR/$FILE |