Commit fb13395f authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fix left args

parent 3b7c5937
...@@ -431,11 +431,11 @@ fi ...@@ -431,11 +431,11 @@ fi
__eget_parse_options() __eget_parse_options()
{ {
local skipopt=0 local argument
local argvalue
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)"
case "$argument" in case "$argument" in
-h|--help) -h|--help)
eget_help eget_help
...@@ -589,16 +589,16 @@ while [ -n "$1" ] ; do ...@@ -589,16 +589,16 @@ while [ -n "$1" ] ; do
fatal "Unknown option '$1', check eget --help." fatal "Unknown option '$1', check eget --help."
;; ;;
*) *)
return $skipopt return $#
;; ;;
esac esac
shift shift
skipopt=$(($skipopt+1))
done done
return $#
} }
__eget_parse_options "$@" __eget_parse_options "$@"
shift $? 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