On Fri, 2 Sep 2016 00:19, gre...@debian.org said: > My dream is something like > export > HI_GPG_THIS_IS_A_TEST_DONT_ASK_PINENTRY_QUESTIONS_AND_CLEANUP_GPG_AGENT_THANKS=1 > (maybe a bit shorter :)
What you can do is GNUPGHOME=$(pwd) gpg-agent --daemon my_test_script this will have gpg-agent start my_test_script and clean itself up after the script terminates. For example my test procedure is to create a test directory, cd to it, and run the above command with this test script: --8<---------------cut here---------------start------------->8--- #!/bin/sh cat >setup-tests.ini <<'EOF' PS1="$(echo "$PS1" | sed 's,\\\$ $,(GnuPGTest)\\\$ ,')" EOF exec bash --init-file setup-tests.ini --8<---------------cut here---------------end--------------->8--- OTOH, gpg-agent will terminate itself after it has detected that the socket file has gone. This check is done once a minute but we are right now considering to improve it using inotify. Shalom-Salam, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. /* Join us at OpenPGP.conf <https://openpgp-conf.org> */
pgpJwEDUUsF6z.pgp
Description: PGP signature