* gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key, send_key_keyserver):
[gnupg.git] / checks / mkdemodirs
blobd6b7d7c4c5bbf5e2188ac7b4b8dca4e84b4fed86
1 #!/bin/sh
3 set -e
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
11 (for i in $NAMES; do
12 [ -d $i ] && rm -r $i
13 done) || true
14 exit 0
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"
22 echo -n "Creating:"
23 for name in $NAMES; do
24 echo -n " $name"
25 [ -d $name ] && rm -r $name
26 mkdir $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~
32 done
33 echo "."
34 [ -f ./tdb.tmp ] && rm ./tdb.tmp
35 rm pubdemo.gpg secdemo.gpg