1999-04-18 10:18:52 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2001-03-22 19:04:47 +01:00
|
|
|
GPG="../g10/gpg --batch --quiet --no-secmem-warning --allow-secret-key-import"
|
1999-04-18 10:18:52 +02:00
|
|
|
NAMES='Alpha Bravo Charlie Delta Echo Foxtrot Golf Hotel India
|
|
|
|
Juliet Kilo Lima Mike November Oscar Papa Quebec Romeo
|
|
|
|
Sierra Tango Uniform Victor Whisky XRay Yankee Zulu'
|
|
|
|
|
|
|
|
if [ "$1" = "--clean" ]; then
|
2000-02-10 17:41:06 +01:00
|
|
|
(for i in $NAMES; do
|
1999-04-18 10:18:52 +02:00
|
|
|
[ -d $i ] && rm -r $i
|
2000-02-10 17:41:06 +01:00
|
|
|
done) || true
|
1999-04-18 10:18:52 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
$GPG --dearmor -o secdemo.gpg --yes ../checks/secdemo.asc
|
|
|
|
$GPG --dearmor -o pubdemo.gpg --yes ../checks/pubdemo.asc
|
|
|
|
[ -f ./tdb.tmp ] && rm ./tdb.tmp
|
|
|
|
GPGDEMO="$GPG --homedir . --trustdb-name ./tdb.tmp --no-default-keyring
|
|
|
|
--keyring pubdemo.gpg --secret-keyring secdemo.gpg"
|
2001-03-22 19:04:47 +01:00
|
|
|
echo -n "Creating:"
|
1999-04-18 10:18:52 +02:00
|
|
|
for name in $NAMES; do
|
2001-03-22 19:04:47 +01:00
|
|
|
echo -n " $name"
|
1999-04-18 10:18:52 +02:00
|
|
|
[ -d $name ] && rm -r $name
|
|
|
|
mkdir $name
|
2000-02-10 17:41:06 +01:00
|
|
|
$GPGDEMO --export-secret-key -o - $name > $name/Secret.gpg
|
1999-10-04 21:27:02 +02:00
|
|
|
$GPG --homedir $name --import $name/Secret.gpg
|
2000-02-10 17:41:06 +01:00
|
|
|
$GPGDEMO --export -o - $name > $name/Public.gpg
|
1999-10-04 21:27:02 +02:00
|
|
|
$GPG --homedir $name --import $name/Public.gpg
|
1999-04-18 10:18:52 +02:00
|
|
|
[ -f $name/pubring.gpg~ ] && rm $name/pubring.gpg~
|
|
|
|
done
|
|
|
|
echo "."
|
|
|
|
[ -f ./tdb.tmp ] && rm ./tdb.tmp
|
|
|
|
rm pubdemo.gpg secdemo.gpg
|
|
|
|
|
|
|
|
|