Browse Source

reduce verbosity

Fabian Peter Hammerle 4 years ago
parent
commit
8fbbcdad59
2 changed files with 11 additions and 7 deletions
  1. 4 1
      invoke-gpgit.sh
  2. 7 6
      serve-gpgit.sh

+ 4 - 1
invoke-gpgit.sh

@@ -1,9 +1,12 @@
 #!/bin/sh
 
-set -ex
+set -e
 
 # ash does not support `-a`:
 # > read: line 5: illegal option -a
 read RECIPIENTS
 set -- $RECIPIENTS
+set -x
+# socat logs exit codes != 0
+#> E waitpid(): child 24 exited with status 1
 exec gpgit "$@"

+ 7 - 6
serve-gpgit.sh

@@ -1,14 +1,15 @@
 #!/bin/sh
 
-set -x
-
 printenv GNUPG_IMPORT | gpg --import --import-options import-show
 
-for fingerprint in $(gpg --list-keys --with-colons | grep '^fpr:' | cut -d ':' -f 10); do
-    echo -e '5\ny\n' | gpg --command-fd 0 --batch --edit-key $fingerprint trust
+for fingerprint in $(gpg --list-keys --with-colons --batch | grep '^fpr:' | cut -d ':' -f 10); do
+    echo -e '5\ny\n' \
+        | gpg --command-fd 0 --batch --edit-key $fingerprint trust 2>/dev/null
 done
 
-# -d -d: log level notice
+set -x
+
+# -d: log level warning
 # -T: inactivity timeout (before input at EOF?, default: none)
 # -t: reply timeout (after input at EOF, default: 0.5s)
-exec socat -d -d -T4 -t16 tcp-l:6156,fork exec:/invoke-gpgit.sh
+exec socat -d -T4 -t16 tcp-l:6156,fork exec:/invoke-gpgit.sh