mirror of
git://git.gnupg.org/gnupg.git
synced 2024-10-31 20:08:43 +01:00
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
GPG="../g10/gpg --batch --quiet --no-secmem-warning"
|
|
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
|
|
for i in $NAMES; do
|
|
[ -d $i ] && rm -r $i
|
|
done
|
|
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"
|
|
/bin/echo "Creating:\c"
|
|
for name in $NAMES; do
|
|
/bin/echo " $name\c"
|
|
[ -d $name ] && rm -r $name
|
|
mkdir $name
|
|
$GPGDEMO --export-secret-key -o - $name | tee $name/Secret.gpg | \
|
|
$GPG --homedir $name --import
|
|
$GPGDEMO --export -o - $name | tee $name/Public.gpg | \
|
|
$GPG --homedir $name --import
|
|
[ -f $name/pubring.gpg~ ] && rm $name/pubring.gpg~
|
|
done
|
|
echo "."
|
|
[ -f ./tdb.tmp ] && rm ./tdb.tmp
|
|
rm pubdemo.gpg secdemo.gpg
|
|
|
|
|