X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=blobdiff_plain;f=common;h=374b81e0498defc0d6895d3617fe3970f06a3cd3;hp=ec7b8e2cfd816f1faadc6b2ffd8c45c2da37fc28;hb=HEAD;hpb=6ea0c51a0898253c89775727df4f3814c64bc877 diff --git a/common b/common index ec7b8e2..374b81e 100644 --- a/common +++ b/common @@ -14,11 +14,13 @@ E_GSU_BAD_BOOL bad value for boolian option E_GSU_BAD_OPTION_TYPE invalid option type E_GSU_BAD_ARG_COUNT invalid number of arguments E_GSU_EDITOR failed to execute editor +E_GSU_INVAL invalid argument E_GSU_MKDIR failed to create directory E_GSU_GETOPTS getopts error E_GSU_DIALOG dialog error E_GSU_MKTEMP mktemp error E_GSU_MENU_TREE invalid menu tree +E_GSU_XCMD external command failed ${gsu_errors:-} " local a b i=0 @@ -29,7 +31,7 @@ ${gsu_errors:-} #echo "a:$a, b: $b" gsu_error_txt[i]="$b" eval $a=$i - i=$(($i + 1)) + i=$((i + 1)) done << EOF $gsu_errors EOF @@ -66,15 +68,15 @@ gsu_err_msg() local txt="$result" err gsu_is_a_number "$ret" - if (($ret < 0)); then + if ((ret < 0)); then gsu_msg "unknown error ($ret:$txt)" exit 1 fi - if (($result >= 0)); then + if ((result >= 0)); then gsu_msg "unknown error ($result:$txt)" exit 1 fi - err=$((0 - $result)) + err=$((0 - result)) if test -n "$txt"; then txt="$txt: ${gsu_error_txt[$err]}" else