]> git.tuebingen.mpg.de Git - gsu.git/blobdiff - funcs/gsu
gsu: Set copyright year to 2011.
[gsu.git] / funcs / gsu
index 673605e43bbca8e66940722b7c587b72ba84964b..c11d19f92ff02e6db1ba4053110780acaa47a438 100644 (file)
--- a/funcs/gsu
+++ b/funcs/gsu
@@ -1,6 +1,6 @@
 #!/bin/bash
 # gsu -- the global subcommand utility
-# (C) 2006-2010 Andre Noll
+# (C) 2006-2011 Andre Noll
 
 _gsu_init_errors()
 {
@@ -378,7 +378,7 @@ _gsu_check_options()
                        return
                esac
 
-               eval ${gsu_config_var_prefix}_$name='"'${val:=$default_value}'"'
+               eval ${gsu_config_var_prefix}_$name='"'\${val:=$default_value}'"'
                # Check option type. ATM, only num and string are supported
                # Other types may be added without breaking compatibility
                case "$option_type" in
@@ -427,7 +427,7 @@ gsu_getopts()
 
        ret=-$E_GSU_GETOPTS
        result="invalid optstring $1"
-       if [[ -z "$1" || "$1" =~ "::" ]]; then
+       if [[ -z "$1" ]] || grep -q '::' <<< "$1" ; then
                gsu_err_msg
                exit 1
        fi