Commit 7314c270 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: improve help, small fixes

parent a648f3d9
...@@ -254,8 +254,11 @@ WGETUSERAGENT='' ...@@ -254,8 +254,11 @@ WGETUSERAGENT=''
CURLUSERAGENT='' CURLUSERAGENT=''
WGETQ='' #-q WGETQ='' #-q
CURLQ='' #-s CURLQ='' #-s
# TODO: aria2c
# TODO: wget --trust-server-names
# TODO:
WGETNAMEOPTIONS='--content-disposition' WGETNAMEOPTIONS='--content-disposition'
CURLNAMEOPTIONS='--remote-name --remote-header-name' CURLNAMEOPTIONS='--remote-name --remote-time --remote-header-name'
LISTONLY='' LISTONLY=''
CHECKURL='' CHECKURL=''
...@@ -266,6 +269,7 @@ CHECKMIRRORS='' ...@@ -266,6 +269,7 @@ CHECKMIRRORS=''
TARGETFILE='' TARGETFILE=''
FORCEIPV='' FORCEIPV=''
set_quiet() set_quiet()
{ {
WGETQ='-q' WGETQ='-q'
...@@ -296,10 +300,17 @@ Options: ...@@ -296,10 +300,17 @@ Options:
--check URL - check if the URL is accessible (returns HTTP 200 OK) --check URL - check if the URL is accessible (returns HTTP 200 OK)
--get-filename URL - print filename for the URL (via Content-Disposition if applicable) --get-filename URL - print filename for the URL (via Content-Disposition if applicable)
Supported URLs:
ftp:// http:// https:// file:/ ipfs://
Supported backends:
wget curl ipfs (todo: aria2c)
Examples: Examples:
$ eget http://ftp.somesite.ru/package-*.x64.tar $ eget http://ftp.somesite.ru/package-*.x64.tar
$ eget http://ftp.somesite.ru/package *.tar $ eget http://ftp.somesite.ru/package *.tar
$ eget https://github.com/owner/project package*.ext $ eget https://github.com/owner/project package*.ext
$ eget -O myname ipfs://QmVRUjnsnxHWkjq91KreCpUk4D9oZEbMwNQ3rzdjwND5dR
$ eget --list http://ftp.somesite.ru/package-*.tar $ eget --list http://ftp.somesite.ru/package-*.tar
$ eget --check http://ftp.somesite.ru/test $ eget --check http://ftp.somesite.ru/test
$ eget --list http://download.somesite.ru 'package-*.tar.xz' $ eget --list http://download.somesite.ru 'package-*.tar.xz'
...@@ -620,7 +631,6 @@ url_check() ...@@ -620,7 +631,6 @@ url_check()
url_get_filename() url_get_filename()
{ {
# FIXME
basename "$1" basename "$1"
} }
...@@ -660,7 +670,7 @@ url_get_filename() ...@@ -660,7 +670,7 @@ url_get_filename()
} }
elif [ -n "$WGET" ] ; then elif [ -n "$WGET" ] && [ "$EGET_BACKEND" != "curl" ] ; then
__wget() __wget()
{ {
if [ -n "$WGETUSERAGENT" ] ; then if [ -n "$WGETUSERAGENT" ] ; then
......
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