Commit 741e16f1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: allow download file from http://site/page/ URL (with latest slash)

parent 1d934d87
...@@ -1362,13 +1362,16 @@ if [ -n "$2" ] ; then ...@@ -1362,13 +1362,16 @@ if [ -n "$2" ] ; then
else else
# do not support / at the end without separately specified mask # do not support / at the end without separately specified mask
if echo "$1" | grep -q "/$" ; then if echo "$1" | grep -q "/$" ; then
fatal "Use http://example.com/e/* to download all files in dir" #fatal "Use http://example.com/e/* to download all files in dir"
fi URL="$1"
MASK=""
else
# drop mask part # drop mask part
URL="$(dirname "$1")/" URL="$(dirname "$1")/"
# wildcards allowed only in the last part of path # wildcards allowed only in the last part of path
MASK=$(basename "$1") MASK=$(basename "$1")
fi
fi fi
# https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm # https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm
......
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