Commit 028f01a3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: improve help text

parent b669a4ea
...@@ -223,28 +223,34 @@ set_quiet() ...@@ -223,28 +223,34 @@ set_quiet()
eget_help() eget_help()
{ {
echo "eget - wget like downloader wrapper with wildcard support in filename part of URL" cat <<EOF
echo "Usage: eget [-q] [-k] [-U] [-O target file] [--list] http://somesite.ru/dir/na*.log"
echo eget - wget like downloader wrapper with wildcard support in filename part of URL
echo "Options:" Usage: eget [options] http://somesite.ru/dir/na*.log
echo " -q - quiet mode"
echo " -k|--no-check-certificate - skip SSL certificate chain support" Options:
echo " -U|-A|--user-agent - send browser like UserAgent" -q - quiet mode
echo " -O file - download to this file (use filename from server if missed)" -k|--no-check-certificate - skip SSL certificate chain support
echo " --list - print files from url with mask" -U|-A|--user-agent - send browser like UserAgent
echo " --check - check if URL is accessible (returns HTTP 200 OK)" -O-|-O - - output downloaded file to stdout
echo " --latest - print only latest version of a file" -O file - download to this file
echo " --second-latest - print only second to latest version of a file" --latest - print only latest version of a file
echo " --allow-mirrors - check mirrors if url is not accessible" --second-latest - print only second to latest version of a file
echo --allow-mirrors - check mirrors if url is not accessible
echo "eget supports --list and download for https://github.com/owner/project urls"
echo --list|--list-only - print only URLs
echo "Examples:" --check URL - check if the URL is accessible (returns HTTP 200 OK)
echo " $ eget --list http://ftp.somesite.ru/package-*.tar"
echo " $ eget http://ftp.somesite.ru/package-*.x64.tar" Examples:
echo " $ eget --check http://ftp.somesite.ru/test" $ eget http://ftp.somesite.ru/package-*.x64.tar
echo " $ eget --list http://download.somesite.ru 'package-*.tar.xz'" $ eget http://ftp.somesite.ru/package *.tar
echo " $ eget --list --latest https://github.com/telegramdesktop/tdesktop/releases 'tsetup.*.tar.xz'" $ eget https://github.com/owner/project package*.ext
$ eget --list http://ftp.somesite.ru/package-*.tar
$ eget --check http://ftp.somesite.ru/test
$ eget --list http://download.somesite.ru 'package-*.tar.xz'
$ eget --list --latest https://github.com/telegramdesktop/tdesktop/releases 'tsetup.*.tar.xz'
EOF
} }
...@@ -274,7 +280,7 @@ while [ -n "$1" ] ; do ...@@ -274,7 +280,7 @@ while [ -n "$1" ] ; do
WGETUSERAGENT="-U '$user_agent'" WGETUSERAGENT="-U '$user_agent'"
CURLUSERAGENT="-A '$user_agent'" CURLUSERAGENT="-A '$user_agent'"
;; ;;
--list) --list|--list-only)
LISTONLY="$1" LISTONLY="$1"
set_quiet set_quiet
;; ;;
......
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