diff --git a/sgad.sh b/sgad.sh index a3ae159e8c2c21ca41899d477bfebca1e09cf339..93fb4e008c3f93e674441b334d25efa402958171 100755 --- a/sgad.sh +++ b/sgad.sh @@ -18,11 +18,21 @@ POSITIONAL="" # String para salvar argumentos passados ao comando while [ $# -gt 0 ] # Percorre todos argumentos do case "$1" in - --sga-name) - sga_name=$2 + --sga_name) + sga_name="$2" shift shift ;; + --sga_name=*) + sga_name="${1#*=}" + shift + ;; + --*) + echo "$0: unrecognized option '$1'" + echo "Available options are:" + echo " --sga_name SGA name to get config from a multiple config file" + exit 1 + ;; *) POSITIONAL="${POSITIONAL} $1" shift