root/10kz/shell/sign-encrypt.jm3

Revision 45, 1.0 kB (checked in by jm3, 2 years ago)
  • added additional config file variable and removed some hardcoded references to the root dir.
  • Nb. there are *still* some hardcoded paths inside the perl file... *we have* to fix these before we can beta!!!
  • added additional error dump to gm script
  • Property svn:executable set to *
  • Property svn:keywords set to Id
Line 
1 #!/bin/bash
2 # $Id$
3
4 # pull in config params like KEY_HOME, GPG_HOME, and app ROOT
5 . configure.sh
6
7 KEY_ID=9112BC51
8 KEY_ID=19ACA985
9 PASSPHRASE="dingus magic"
10 PLAINTEXT=working-context/foo.txt
11 RECIPIENTS="jas@juniorplenty.com nick@nicksfriends.com"
12
13 for r in $RECIPIENTS
14 do
15         RECIPIENT_STRING="-r $r $RECIPIENT_STRING"
16 done
17
18 echo Content-type: text/plain
19 echo
20 echo
21
22 #echo bash your head in
23
24 #echo running as
25 #whoami
26 #echo
27 #echo in `pwd`
28 #echo
29 #echo
30
31 #echo encoding \'$PLAINTEXT\':
32 #cat $PLAINTEXT
33 #echo to $RECIPIENTS:
34 #echo
35 cmd="/sw/bin/gpg \
36                                 --no-tty $RECIPIENT_STRING \
37                                 -r $KEY_ID \
38                                 --default-key $KEY_ID \
39                                 --homedir $KEY_HOME \
40                                 --no-permission-warning \
41                                 --command-fd 0 \
42                                 --passphrase-fd 0 \
43                                 --load-extension idea \
44                                 -sea $PLAINTEXT"
45
46 #echo "command is: $cmd"
47 output=`echo "$PASSPHRASE" | $cmd 2>&1 `
48 ret_val=$?
49
50 # CHECK RET VAL:::::::::::
51
52 cat $PLAINTEXT.asc
53 rm $PLAINTEXT.asc
54 echo
55 echo result code from gpg was: $ret_val
56 echo $output
57
Note: See TracBrowser for help on using the browser.