From 26bf43e7bc25337fefbf813e83e9c584df0a70b8 Mon Sep 17 00:00:00 2001 From: rhatto Date: Sun, 7 Aug 2005 22:50:39 +0000 Subject: organizacao da rotina principal --- firma | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/firma b/firma index 2d1e7a3..6488a68 100755 --- a/firma +++ b/firma @@ -340,6 +340,16 @@ EOF # main - umask 0777 +export LANG=en_US +USED_ARRAYS="MESSAGE GPG_MESSAGE LIST_MESSAGE" + +# declare all vars +declare n +for array in $USED_ARRAYS; do + declare -a $array +done + +export LANG=en_US # command line checking if [ -z "$2" -a "$1" != "-c" -a "$1" != "-h" -a "$1" != "-v" ]; then @@ -361,14 +371,6 @@ if [ "$1" != "-c" -a "$1" != "-h" -a "$1" != "-v" ]; then fi fi -# declare all vars -declare n -for array in MESSAGE GPG_MESSAGE LIST_MESSAGE; do - declare -a $array -done - -export LANG=en_US - # get gpg parameters and check the config if [ "$1" = "-a" -o "$1" = "-p" -o "$1" = "-r" ]; then gpg_args @@ -407,4 +409,8 @@ else exit 1 fi -unset MESSAGE; unset GPG_MESSAGE; unset LIST_MESSAGE +# un-declare all vars +declare n +for array in $USED_ARRAYS; do + unset $array +done -- cgit v1.2.3