gpgme/tests/gpg/mkdemodirs
Marcus Brinkmann 790a8e192f 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* gpg/: New directory.
	* Makefile.am, t-verify.c, t-encrypt.c, t-signers.c, t-trustlist.c,
	t-sign.c, t-keylist.c, t-import.c, t-genkey.c, t-export.c,
	t-decrypt-verify.c, t-decrypt.c, t-version.c, t-data.c, mkdemodirs.
	cipher-1.asc, cipher-2.asc, geheim.txt, pubdemo.asc, pubkey-1.asc,
	secdemo.asc, seckey-1.asc): Move to sub directory gpg/.

	* gpg/Makefile.am (INCLUDES): Include gpgme/, not include/ and
	intl/.
	(LDD): Correct relative path to gpgme library.
	(TESTS): Remove t-version and t-data.
	* gpg/t-verify.c, gpg/t-encrypt.c, gpg/t-signers.c, gpg/t-trustlist.c,
	gpg/t-sign.c, gpg/t-keylist.c, gpg/t-import.c, gpg/t-genkey.c,
	gpg/t-export.c, gpg/t-decrypt-verify.c, gpg/t-decrypt.c,
	t-version.c, t-data.c): Include gpgme.h, not "../gpgme/gpgme.h".

	* Makefile.am: New file.
	* gpgsm/: New directory.
	* gpgsm/Makefile.am: New file.
2001-11-22 03:01:26 +00:00

45 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
set -e
GPG="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 || true
done) || true
exit 0
fi
[ -z "$srcdir" ] && srcdir="../tests"
$GPG --dearmor -o secdemo.gpg --yes $srcdir/secdemo.asc
$GPG --dearmor -o pubdemo.gpg --yes $srcdir/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"
echo -n "Creating:"
for name in $NAMES; do
echo -n " $name"
[ -d $name ] && rm -r $name
mkdir $name
$GPGDEMO --export-secret-key -o - $name > $name/Secret.gpg
$GPG --homedir $name --allow-secret-key-import --import $name/Secret.gpg
$GPGDEMO --export -o - $name > $name/Public.gpg
$GPG --homedir $name --import $name/Public.gpg
[ -f $name/pubring.gpg~ ] && rm $name/pubring.gpg~
done
echo "."
[ -f ./tdb.tmp ] && rm ./tdb.tmp
rm pubdemo.gpg secdemo.gpg