aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
authorrhatto <rhatto>2005-08-07 15:17:49 +0000
committerrhatto <rhatto>2005-08-07 15:17:49 +0000
commitde1fd94358e27682736755fac6f98500c86dc7cf (patch)
tree42034e658a44bffa5bce719cb1682f85d4df18a3 /firma
parentd63679867e2f73b28bdebb70db478b16e8f500fe (diff)
downloadfirma-de1fd94358e27682736755fac6f98500c86dc7cf.tar.gz
firma-de1fd94358e27682736755fac6f98500c86dc7cf.tar.bz2
mudancas em: get_message, get_gpg_message e process_message
Diffstat (limited to 'firma')
-rwxr-xr-xfirma9
1 files changed, 5 insertions, 4 deletions
diff --git a/firma b/firma
index 72150ed..e7582c1 100755
--- a/firma
+++ b/firma
@@ -96,11 +96,12 @@ function get_message {
MESSAGE[$n]="$STDIN\n"
((++n))
done
+ echo $n
}
function get_gpg_message {
signal=0
- x=0
+ x=0; n=$1
for ((count=0;count<=n;count++)); do
if [[ $signal == "0" ]] && [[ "$(echo "${MESSAGE[$count]}" | grep -v -e "-----BEGIN PGP MESSAGE-----")" == "" ]]; then
GPG_MESSAGE[$x]=${MESSAGE[$count]}
@@ -183,9 +184,9 @@ $DATE
function process_message {
# process a message sent to the list
- get_message
- get_message_headers
- get_gpg_message
+ lines=`get_message`
+ get_message_headers
+ get_gpg_message $lines
# if signature is Good, encrypt and send it for each list subscriber
# todo: declare a function to decrypt, re-encrypt and send the list messages