chiark / gitweb /
New gnupg agent thing
[dgit.git] / tests / tstunt / gpg
index 790c46c86ed9a3d6b6cf2cfa872f8eb6f446c668..74152bd990670362e7e62f49cefe5068fede007b 100755 (executable)
@@ -1,20 +1,6 @@
 #!/bin/sh
 set -e
 
-for attempt in '' exec; do
-
-set +e
-$attempt                                               \
-$DGIT_TEST_REAL_GPG                                    \
-       --agent-program=$DGIT_STUNT_AGENT               \
-       "$@"
-rc=$?
-set -e
-
-if [ $rc != 2 ]; then exit $rc; fi
-
-echo >&2 "WARNING - GNUPG FAILED $rc - STUNT GNUPG $attempt $*"
-
-done
-
-exit 127
+exec \
+with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \
+       $tmp "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@"