source: trunk/packs/glue/verify-message.in @ 8990

Revision 8990, 1.2 KB checked in by ghudson, 28 years ago (diff)
Use @PATH@ (substituted in at build time) to determine canonical path to pgp, rather than relying on bin symlink.
  • 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
9attach -quiet -nomap pgp
10
11# Nothing below this line needs to be modified to use a different keyring.
12
13if [ $# -eq 0 ]; then
14        # Called with no arguments.  Use current MH message number.
15          cd `show -noheader -showproc pwd`
16          msgfile=`show -noheader -showproc echo $1` || exit 1
17else
18        # Argument; either filename, dash,  or MH message number
19        if [ $1 = "-" ]; then
20                # standard input
21                msgfile=-f
22        elif [ -s $1 ]; then
23                # Filename
24                msgfile=$1
25        else
26                # MH message number
27                cd `show -noheader -showproc pwd`
28                msgfile=`show -noheader -showproc echo $1` || exit 1
29        fi
30fi
31
32TESTECHO=`echo -n`
33case "$TESTECHO" in
34   -n) N=''; C='\c';;
35   *)  N='-n'; C='';;
36esac
37
38outfile=/usr/tmp/verify.$$
39rm -f $outfile
40page=${PAGER-more}
41echo "Please make sure the following says the signature is good and that"
42echo "the message is addressed to you."
43
44@PATH@ $msgfile -o $outfile +verbose=0
45if [ $? = 0 ]; then
46        echo ""
47        echo $N "The message follows. Press ENTER to continue... $C"
48        read foo
49        echo "==============="
50        $page $outfile
51        rm -f $outfile
52fi
Note: See TracBrowser for help on using the repository browser.