#! /bin/sh

env USETOOLS=no MAKEOBJDIRPREFIX=/usr/obj/i386 sh -c 'cd ../lib && \
	make cleandir ; \
	make ; \
	su root -c "make install"'
env USETOOLS=no MAKEOBJDIRPREFIX=/usr/obj/i386 sh -c 'cd ../bin && \
	make cleandir ; \
	make ; \
	su root -c "make install"'
echo "======> sign/verify 180938 file"
cp configure a
/usr/bin/netpgp --sign a
/usr/bin/netpgp --verify a.gpg
echo "======> attempt to verify an unsigned file"
/usr/bin/netpgp --verify a 
echo "======> encrypt/decrypt 10809 file"
cp src/bin/netpgp.1 b
/usr/bin/netpgp --encrypt b
/usr/bin/netpgp --decrypt b.gpg
diff src/bin/netpgp.1 b && echo "No differences found"
echo "======> encrypt/decrypt 180938 file"
cp configure c
/usr/bin/netpgp --encrypt c
/usr/bin/netpgp --decrypt c.gpg
diff configure c && echo "No differences found"
echo "======> encrypt/decrypt bigass file"
cat configure configure configure configure configure configure > d
ls -l d
cp d e
/usr/bin/netpgp --encrypt d
/usr/bin/netpgp --decrypt d.gpg
diff e d && echo "No differences found"
echo "======> version information"
/usr/bin/netpgp --version
rm -f a a.gpg b b.gpg c c.gpg d d.gpg e
