serve-gpgit.sh 496 B

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