diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-09-19 20:39:50 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-09-19 20:39:50 -0300 |
commit | b4ff8748d593c9dfd162dabfbdd5bb33d44cd399 (patch) | |
tree | d723783edb27b779bd7dc4ca5d840673ae8c2798 | |
parent | 78a591e5a26431d6783bdb007bc014cf03b4b30d (diff) | |
download | keyringer-b4ff8748d593c9dfd162dabfbdd5bb33d44cd399.tar.gz keyringer-b4ff8748d593c9dfd162dabfbdd5bb33d44cd399.tar.bz2 |
Using $BASENAME to check batch mode
-rwxr-xr-x | share/keyringer/append | 2 | ||||
-rwxr-xr-x | share/keyringer/encrypt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/share/keyringer/append b/share/keyringer/append index 81300e0..27211a6 100755 --- a/share/keyringer/append +++ b/share/keyringer/append @@ -15,7 +15,7 @@ IFS=$'\n' CONTENT=($(keyringer_exec decrypt $BASEDIR $FILE)) -if [ "$1" = "append" ]; then +if [ "$BASENAME" == "append" ]; then # only display directions if we're running append, not append-batch echo " " echo "$FILE currently has ${#CONTENT[@]} lines" diff --git a/share/keyringer/encrypt b/share/keyringer/encrypt index 14ee707..c073a58 100755 --- a/share/keyringer/encrypt +++ b/share/keyringer/encrypt @@ -13,8 +13,8 @@ keyringer_get_new_file $2 # Encrypt mkdir -p $KEYDIR/`dirname $FILE` -if [ "$1" = "encrypt" ]; then - # only display directions if we're running encrypt, not encrypt-batch +if [ "$BASENAME" == "encrypt" ]; then + # Only display directions if we're running encrypt, not encrypt-batch echo "Type your message and finish your input with EOF (Ctrl-D)." fi |