Commit f065a2f0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: replace cut with parameter expansion in option parsing

parent 8ffa1f68
......@@ -546,8 +546,12 @@ local argument
local argvalue
local count="$#"
while [ -n "$1" ] ; do
argument="$(echo "$1" | cut -d= -f1)"
argvalue="$(echo "$1" | cut -s -d= -f2-)"
argument="${1%%=*}"
if [ "$argument" = "$1" ] ; then
argvalue=""
else
argvalue="${1#*=}"
fi
case "$argument" in
-h|--help)
eget_help
......
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