]> git.tuebingen.mpg.de Git - gsu.git/blobdiff - common
common: Allow undefined $gsu_errors.
[gsu.git] / common
diff --git a/common b/common
index fe64cd6b61f690d6ad06da0b2cae747e2ba1f308..d41809585ab22e282fdc57ed757ea9e716b66aae 100644 (file)
--- a/common
+++ b/common
@@ -19,7 +19,7 @@ E_GSU_GETOPTS                 getopts error
 E_GSU_DIALOG                   dialog error
 E_GSU_MKTEMP                   mktemp error
 E_GSU_MENU_TREE                        invalid menu tree
-$gsu_errors
+${gsu_errors:-}
 "
        local a b i=0
        while read a b; do
@@ -39,7 +39,7 @@ EOF
 gsu_is_a_number()
 {
        result="$1"
-       if (("$1" == "$1")) &> /dev/null; then
+       if [ "$1" -eq "$1" ] &> /dev/null; then
                ret=$GSU_SUCCESS
        else
                ret=-$E_GSU_NOT_A_NUMBER