diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-09-18 12:49:45 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-09-18 12:49:45 -0300 |
commit | f9e575896519e78788b0bb5cd2eb1f1f4840f88a (patch) | |
tree | 826ac7f9b24f6d4cf92d80ed76e9311447e6bf89 /lib | |
parent | 2aa6f0127bad78d4dc3279f104c4660ee47855a5 (diff) | |
download | keyringer-f9e575896519e78788b0bb5cd2eb1f1f4840f88a.tar.gz keyringer-f9e575896519e78788b0bb5cd2eb1f1f4840f88a.tar.bz2 |
Checking for $BASEDIR and $OPTIONS at keyringer_set_env
Diffstat (limited to 'lib')
-rw-r--r-- | lib/keyringer/functions | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions index d474666..96ca7e6 100644 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -171,6 +171,11 @@ function keyringer_set_env { RECIPIENTS="$BASEDIR/config/recipients" OPTIONS="$BASEDIR/config/options" + if [ -z "$BASEDIR" ]; then + keyringer_action_usage + exit 1 + fi + if [ ! -f "$RECIPIENTS" ]; then echo "No recipient config was found" exit 1 @@ -180,6 +185,11 @@ function keyringer_set_env { echo "You have to set EDITOR env variable" exit 1 fi + + if [ ! -f "$OPTIONS" ]; then + echo "No option config was found" + exit 1 + fi } # Get a single argument |