diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-01-04 19:47:59 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-01-04 19:47:59 -0200 |
commit | 6f3ba0425a7d3577f4adde66ee66c2460de8690f (patch) | |
tree | c85fedadc4b350394426329762ef813fbda73213 /share/keyringer/decrypt | |
parent | b6115dbdc3c7b77be834a474131c9f68bbdd7487 (diff) | |
download | keyringer-6f3ba0425a7d3577f4adde66ee66c2460de8690f.tar.gz keyringer-6f3ba0425a7d3577f4adde66ee66c2460de8690f.tar.bz2 |
Major design changes
Diffstat (limited to 'share/keyringer/decrypt')
-rwxr-xr-x | share/keyringer/decrypt | 23 |
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 |