Commit 5d64129c authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fix url from page filtering

parent 74a6bb4f
......@@ -306,10 +306,11 @@ fi
# do not support /
if echo "$1" | grep -q "/$" ; then
if echo "$1" | grep -q "/$" && [ -z "$2" ] ; then
fatal "Use http://example.com/e/* to download all files in dir"
fi
# TODO: curl?
# If ftp protocol, just download
if echo "$1" | grep -q "^ftp://" ; then
[ -n "$LISTONLY" ] && fatal "TODO: list files for ftp:// do not supported yet"
......@@ -362,7 +363,8 @@ fi
ERROR=0
for fn in $(get_urls | filter_glob "$MASK" | filter_order) ; do
sget "$URL/$(basename "$fn")" || ERROR=1
is_url "$fn" || fn="$URL/$(basename "$fn")"
sget "$fn" || ERROR=1
done
exit $ERROR
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