summaryrefslogtreecommitdiff
path: root/share/keyringer/decrypt
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-01-04 19:47:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-01-04 19:47:59 -0200
commit6f3ba0425a7d3577f4adde66ee66c2460de8690f (patch)
treec85fedadc4b350394426329762ef813fbda73213 /share/keyringer/decrypt
parentb6115dbdc3c7b77be834a474131c9f68bbdd7487 (diff)
downloadkeyringer-6f3ba0425a7d3577f4adde66ee66c2460de8690f.tar.gz
keyringer-6f3ba0425a7d3577f4adde66ee66c2460de8690f.tar.bz2
Major design changes
Diffstat (limited to 'share/keyringer/decrypt')
-rwxr-xr-xshare/keyringer/decrypt23
1 files changed, 23 insertions, 0 deletions
diff --git a/share/keyringer/decrypt b/share/keyringer/decrypt
new file mode 100755
index 0000000..b933f3f
--- /dev/null
+++ b/share/keyringer/decrypt
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Decrypt files.
+#
+
+# Load functions
+LIB="`dirname $0`/../../lib/keyringer/functions"
+source $LIB
+
+BASEDIR="$1"
+FILE="`keyringer_filename $2`"
+KEYDIR="$BASEDIR/keys"
+BASENAME="`basename $0`"
+
+if [ -z "$FILE" ]; then
+ echo "Usage: `basename $0` <basedir> <file>"
+ exit 1
+elif [ ! -f "$KEYDIR/$FILE" ]; then
+ echo "File not found: $KEYDIR/$FILE"
+ exit 1
+fi
+
+gpg -d $KEYDIR/$FILE