aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto>2005-08-07 22:50:39 +0000
committerrhatto <rhatto>2005-08-07 22:50:39 +0000
commit26bf43e7bc25337fefbf813e83e9c584df0a70b8 (patch)
treeb906102d3cd714558990422fb68772ed00cabb90
parent4b56b64795aa83405b37c8a3149dc3e6e38eecf7 (diff)
downloadfirma-26bf43e7bc25337fefbf813e83e9c584df0a70b8.tar.gz
firma-26bf43e7bc25337fefbf813e83e9c584df0a70b8.tar.bz2
organizacao da rotina principal
-rwxr-xr-xfirma24
1 files 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