X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=common;h=d41809585ab22e282fdc57ed757ea9e716b66aae;hb=1e5e330b7a100636ef7d3874a322e7c23d7fe575;hp=eaa5751b43a9133fba3e497b5d45babe1e46b0e9;hpb=ed4541e12d830109204e66ac8c76750d3693eeff;p=gsu.git diff --git a/common b/common index eaa5751..d418095 100644 --- a/common +++ b/common @@ -1,5 +1,6 @@ #!/bin/bash -# (C) 2006-2011 Andre Noll +# Copyright (C) 2006 Andre Noll +# Licensed under the LGPL, version 3. See COPYING and COPYING.LESSER. _gsu_init_errors() { @@ -15,7 +16,10 @@ E_GSU_BAD_ARG_COUNT invalid number of arguments E_GSU_EDITOR failed to execute editor E_GSU_MKDIR failed to create directory E_GSU_GETOPTS getopts error -$gsu_errors +E_GSU_DIALOG dialog error +E_GSU_MKTEMP mktemp error +E_GSU_MENU_TREE invalid menu tree +${gsu_errors:-} " local a b i=0 while read a b; do @@ -35,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