Commit 4f51e94a authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fix to support many args

parent 20b7fed1
...@@ -450,6 +450,7 @@ __eget_parse_options() ...@@ -450,6 +450,7 @@ __eget_parse_options()
{ {
local argument local argument
local argvalue local argvalue
local count="$#"
while [ -n "$1" ] ; do while [ -n "$1" ] ; do
argument="$(echo "$1" | cut -d= -f1)" argument="$(echo "$1" | cut -d= -f1)"
argvalue="$(echo "$1" | cut -s -d= -f2)" argvalue="$(echo "$1" | cut -s -d= -f2)"
...@@ -612,16 +613,17 @@ while [ -n "$1" ] ; do ...@@ -612,16 +613,17 @@ while [ -n "$1" ] ; do
fatal "Unknown option '$1', check eget --help." fatal "Unknown option '$1', check eget --help."
;; ;;
*) *)
return $# return $(($count-$#))
;; ;;
esac esac
shift shift
done done
return $# return $(($count-$3))
} }
__eget_parse_options "$@" __eget_parse_options "$@"
shift $(($#-$?)) # no more than 255 options
shift $?
__eget_parse_options $EGET_OPTIONS __eget_parse_options $EGET_OPTIONS
#############################3 #############################3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment