aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-09-19 20:39:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-09-19 20:39:50 -0300
commitb4ff8748d593c9dfd162dabfbdd5bb33d44cd399 (patch)
treed723783edb27b779bd7dc4ca5d840673ae8c2798
parent78a591e5a26431d6783bdb007bc014cf03b4b30d (diff)
downloadkeyringer-b4ff8748d593c9dfd162dabfbdd5bb33d44cd399.tar.gz
keyringer-b4ff8748d593c9dfd162dabfbdd5bb33d44cd399.tar.bz2
Using $BASENAME to check batch mode
-rwxr-xr-xshare/keyringer/append2
-rwxr-xr-xshare/keyringer/encrypt4
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