source: trunk/packs/glue/verify-message.sh @ 14383

Revision 14383, 1.2 KB checked in by ghudson, 25 years ago (diff)
Fix attachandrun invocation of pgp.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# Script to verify PGP signature of mail message
4#
5
6# Location of public key ring: pubring.pgp
7PGPPATH=/afs/athena/system/config/keys/early-warn; export PGPPATH
8
9# Nothing below this line needs to be modified to use a different keyring.
10
11if [ $# -eq 0 ]; then
12        # Called with no arguments.  Use current MH message number.
13          cd `show -noheader -showproc pwd`
14          msgfile=`show -noheader -showproc echo $1` || exit 1
15else
16        # Argument; either filename, dash,  or MH message number
17        if [ $1 = "-" ]; then
18                # standard input
19                msgfile=-f
20        elif [ -s $1 ]; then
21                # Filename
22                msgfile=$1
23        else
24                # MH message number
25                cd `show -noheader -showproc pwd`
26                msgfile=`show -noheader -showproc echo $1` || exit 1
27        fi
28fi
29
30TESTECHO=`echo -n`
31case "$TESTECHO" in
32   -n) N=''; C='\c';;
33   *)  N='-n'; C='';;
34esac
35
36outfile=/usr/tmp/verify.$$
37rm -f $outfile
38page=${PAGER-more}
39echo "Please make sure the following says the signature is good and that"
40echo "the message is addressed to you."
41
42/bin/athena/attachandrun pgp pgp pgp $msgfile -o $outfile +verbose=0
43if [ $? = 0 ]; then
44        echo ""
45        echo $N "The message follows. Press ENTER to continue... $C"
46        read foo
47        echo "==============="
48        $page $outfile
49        rm -f $outfile
50fi
Note: See TracBrowser for help on using the repository browser.