5
GPG="../g10/gpg --batch --quiet --no-secmem-warning --allow-secret-key-import"
6
NAMES='Alpha Bravo Charlie Delta Echo Foxtrot Golf Hotel India
7
Juliet Kilo Lima Mike November Oscar Papa Quebec Romeo
8
Sierra Tango Uniform Victor Whisky XRay Yankee Zulu'
10
if [ "$1" = "--clean" ]; then
17
$GPG --dearmor -o secdemo.gpg --yes ../checks/secdemo.asc
18
$GPG --dearmor -o pubdemo.gpg --yes ../checks/pubdemo.asc
19
[ -f ./tdb.tmp ] && rm ./tdb.tmp
20
GPGDEMO="$GPG --homedir . --trustdb-name ./tdb.tmp --no-default-keyring
21
--keyring pubdemo.gpg --secret-keyring secdemo.gpg"
23
for name in $NAMES; do
25
[ -d $name ] && rm -r $name
27
$GPGDEMO --export-secret-key -o - $name > $name/Secret.gpg
28
$GPG --homedir $name --import $name/Secret.gpg
29
$GPGDEMO --export -o - $name > $name/Public.gpg
30
$GPG --homedir $name --import $name/Public.gpg
31
[ -f $name/pubring.gpg~ ] && rm $name/pubring.gpg~
34
[ -f ./tdb.tmp ] && rm ./tdb.tmp
35
rm pubdemo.gpg secdemo.gpg