Commit d468a1f7 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: support --option=value format for long options

parent 11ff9ce7
...@@ -510,12 +510,15 @@ while [ -n "$1" ] ; do ...@@ -510,12 +510,15 @@ while [ -n "$1" ] ; do
AXELHEADER="--header=$argvalue" AXELHEADER="--header=$argvalue"
;; ;;
-P|--output-dir) -P|--output-dir)
shift if [ -z "$argvalue" ];then
CURLOUTPUTDIR="--create-dirs --output-dir $1" shift
WGETOUTPUTDIR="-P $1" argvalue="$1"
ARIA2OUTPUTDIR="-d $1" fi
AXELOUTPUTDIR="-o $1" CURLOUTPUTDIR="--create-dirs --output-dir $argvalue"
USEOUTPUTDIR="$1" WGETOUTPUTDIR="-P $argvalue"
ARIA2OUTPUTDIR="-d $argvalue"
AXELOUTPUTDIR="-o $argvalue"
USEOUTPUTDIR="$argvalue"
;; ;;
-U|-A|--user-agent) -U|-A|--user-agent)
USERAGENT="Mozilla/5.0 (X11; Linux $arch) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" USERAGENT="Mozilla/5.0 (X11; Linux $arch) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
...@@ -646,9 +649,12 @@ while [ -n "$1" ] ; do ...@@ -646,9 +649,12 @@ while [ -n "$1" ] ; do
esac esac
;; ;;
--load-cookies) --load-cookies)
shift; if [ -z "$argvalue" ];then
WGETLOADCOOKIES="--load-cookies $1" shift
CURLCOOKIE="--cookie $1" argvalue="$1"
fi
WGETLOADCOOKIES="--load-cookies $argvalue"
CURLCOOKIE="--cookie $argvalue"
;; ;;
-*) -*)
fatal "Unknown option '$1', check eget --help." fatal "Unknown option '$1', check 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