summaryrefslogtreecommitdiff
path: root/share/keyringer/decrypt
diff options
context:
space:
mode:
Diffstat (limited to 'share/keyringer/decrypt')
-rwxr-xr-xshare/keyringer/decrypt12
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