]> gitweb.fluxo.info Git - firma.git/commitdiff
NewList and SubscribeUsers minor fixes
authorrhatto <rhatto>
Tue, 10 Oct 2006 03:53:59 +0000 (03:53 +0000)
committerrhatto <rhatto>
Tue, 10 Oct 2006 03:53:59 +0000 (03:53 +0000)
firma

diff --git a/firma b/firma
index 0a005303c09dd1fb2c05c4a7c3421d65161877e7..07745f6c437599cb63ea3f527ff4555324af23fa 100755 (executable)
--- a/firma
+++ b/firma
@@ -145,9 +145,10 @@ function DeclareGpgVars {
   # depends on function(s): none
   # returns: 0
   #-------------------------------------------------------------
-  GPG_FLAGS="--no-options --no-default-keyring --homedir $LIST_HOMEDIR --quiet --no-tty --no-use-agent --no-permission-warning"
-  GPG="$GPG_BINARY $GPG_FLAGS --batch"
-  GPG_NOBATCH="$GPG_BINARY $GPG_FLAGS --no-batch"
+  GPG_FLAGS="--no-options --no-default-keyring --homedir $LIST_HOMEDIR --quiet --no-tty --batch --no-use-agent --no-permission-warning"
+  GPG_FLAGS_NO_BATCH="--no-options --no-default-keyring --homedir $LIST_HOMEDIR --quiet --no-batch --no-use-agent --no-permission-warning"
+  GPG="$GPG_BINARY $GPG_FLAGS"
+  GPG_NOBATCH="$GPG_BINARY $GPG_FLAGS_NO_BATCH"
   GPG_LIST_KEYS="$GPG --list-keys --with-colons"
   GPG_DECRYPT="$GPG --passphrase-fd 0 --decrypt"
   GPG_ENCRYPT="$GPG --armor --trust-model always --local-user $LIST_ADDRESS --passphrase-fd 0 --no-emit-version --sign --encrypt"
@@ -1048,21 +1049,23 @@ EOF
 
               SubscribeUsers $method $LIST_ADMIN
 
-              break
-            elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then
-              echo "  Not sending public key from list to admins. Do it manually."
-              break
-            else
-              echo "  Please answer either yes or no."
-            fi
-          done
+              # send list pubkey to admins
+              if [ "$?" == "0" ]; then
+                while true; do
+                  read -rep "  Send list public key to list admins? (Y/n) " answer
+                  answer="`echo $answer | tr '[:lower:]' '[:upper:]'`"
+                  if [ -z "$answer" ] || [ "$answer" == "Y" ] || [ "$answer" == "YES" ]; then
+                    SendListPubkey $LIST_ADMIN
+                    break
+                  elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then
+                    echo "  Not sending public key from list to admins. Do it manually."
+                    break
+                  else
+                    echo "  Please answer either yes or no."
+                  fi
+                done
+              fi
 
-          # send list pubkey to admins
-          while true; do
-            read -rep "  Send list public key to list admins? (Y/n) " answer
-            answer="`echo $answer | tr '[:lower:]' '[:upper:]'`"
-            if [ -z "$answer" ] || [ "$answer" == "Y" ] || [ "$answer" == "YES" ]; then
-              SendListPubkey $LIST_ADMIN
               break
             elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then
               echo "  Not sending public key from list to admins. Do it manually."