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

eget: improve help, small fixes

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