]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Using $BASENAME to check batch mode
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 19 Sep 2010 23:39:50 +0000 (20:39 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 19 Sep 2010 23:39:50 +0000 (20:39 -0300)
share/keyringer/append
share/keyringer/encrypt

index 81300e0e35ba6396cd1237a9f94fc847cf6d9226..27211a679eb9649f3413cee535077b17d074925a 100755 (executable)
@@ -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"
index 14ee7073834cd333d65ffaf33de8459587d2fa1e..c073a5835d0cac3b49851468a20f2b2b709c3c91 100755 (executable)
@@ -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