File: gnupg

package info (click to toggle)
dgit 9.13
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,216 kB
  • sloc: perl: 11,829; sh: 5,208; makefile: 306; tcl: 69
file content (32 lines) | stat: -rwxr-xr-x 700 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
. tests/lib

mkdir -p $tmp/gnupg
cp $troot/gnupg/* $tmp/gnupg
chmod go-rw $tmp/gnupg/*

export DGIT_TEST_GNUPG_GLOBAL_LOCK=$tmp/gnupg/dgit-test-global-lock
export DGIT_TEST_GNUPG_LOG=$tmp/gnupg-workarounds.log

setup='
	export GNUPGHOME=$tmp/gnupg
	export DGIT_TEST_GNUPG_GLOBAL_LOCK DGIT_TEST_GNUPG_LOG

	cat >$tmp/gnupg/gpg-agent.conf <<END
	log-file $tmp/gnupg/AGENT.log
END
	#debug-all

	: ${DGIT_TEST_REAL_GPG_AGENT:=$(type -p gpg-agent)}
	export DGIT_TEST_REAL_GPG_AGENT=$(type -p gpg-agent)
	export DGIT_STUNT_AGENT=$troot/tstunt/gpg-agent
	t-tstunt gpg
'

eval "$setup"

gpg --list-secret

t-setup-done 'DGIT_TEST_GNUPG_GLOBAL_LOCK DGIT_TEST_GNUPG_LOG' \
	'gnupg' "$setup"