Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / support / general / RCS / pgpshow.sh,v
1 head    1.4;
2 access;
3 symbols;
4 locks; strict;
5 comment @# @;
6
7
8 1.4
9 date    96.02.09.01.32.45;      author jromine; state Exp;
10 branches;
11 next    1.3;
12
13 1.3
14 date    95.12.06.21.05.46;      author jromine; state Exp;
15 branches;
16 next    1.2;
17
18 1.2
19 date    95.12.06.21.00.19;      author jromine; state Exp;
20 branches;
21 next    1.1;
22
23 1.1
24 date    95.12.06.20.57.55;      author jromine; state Exp;
25 branches;
26 next    ;
27
28
29 desc
30 @@
31
32
33 1.4
34 log
35 @fix usage of tr to be acceptable to SYS5
36 @
37 text
38 @: run this script through /bin/sh
39 : $Id:$
40
41 CMD=$1 SHOW=more REFILE=N
42
43 X=$2.tmp Y=$2.out Z=$2
44 trap "rm -f $X $Y" 0 1 2 3 13 15
45
46 shift; shift
47 for A in $*; do
48     A="`echo $A | tr '[A-Z]' '[a-z]'`"
49     case "$A" in
50         format=*)
51             if [ "$A" = "format=mime" ]; then
52                 SHOW="show -file"
53                 REFILE=T
54             fi
55             ;;
56
57         x-*)
58             ;;
59
60         *)  echo "usage: pgpshow -store/-show file"
61             exit 1
62             ;;  
63     esac
64 done
65
66 case "$CMD" in
67     -show)  rm -f $X $Y
68             if pgp $Z -o $X | tee $Y; then
69                 PGP_SIGNATURE=`grep "^Good signature from user " $Y | sed -e 's%^Good signature from user "\(.*\)".$%\1%'`
70                 export PGP_SIGNATURE
71                 $SHOW $X
72             else
73                 exit 1
74             fi
75             ;;
76
77     -store) cat > $X
78             pgp $X -o $Z
79             if [ "$REFILE" = "T" ]; then
80                 refile -file $Z +inbox
81             fi
82             ;;
83
84     *)      echo "usage: pgpshow -store/-show file"
85             exit 1
86             ;;
87 esac
88
89 exit 0
90 @
91
92
93 1.3
94 log
95 @pgp fixes from mtr
96 @
97 text
98 @d2 1
99 d11 1
100 a11 1
101     A="`echo $A | tr A-Z a-z`"
102 @
103
104
105 1.2
106 log
107 @pgp fixes from  mtr
108 @
109 text
110 @d19 3
111 @
112
113
114 1.1
115 log
116 @Initial revision
117 @
118 text
119 @d5 2
120 a6 2
121 X=$2.tmp Z=$2
122 trap "rm -f $X" 0 1 2 3 13 15
123 d10 1
124 d26 4
125 a29 2
126     -show)  rm -f $X
127             if pgp $Z -o $X; then
128 @