Commit 53015ab0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: improve is_url checking

parent 56eb70c5
...@@ -156,7 +156,7 @@ filter_order() ...@@ -156,7 +156,7 @@ filter_order()
is_fileurl() is_fileurl()
{ {
echo "$1" | grep -q "^/" && return echo "$1" | grep -q "^/" && return
echo "$1" | grep -q "file:/" echo "$1" | grep -q "^file:/"
} }
dir_from_url() dir_from_url()
...@@ -166,11 +166,10 @@ dir_from_url() ...@@ -166,11 +166,10 @@ dir_from_url()
is_url() is_url()
{ {
echo "$1" | grep -q ":/" echo "$1" | grep -q "^[filehtps]*:/"
} }
# args: cmd <URL> <options> # args: cmd <URL> <options>
# will run cmd <options> <URL> # will run cmd <options> <URL>
download_with_mirroring() download_with_mirroring()
......
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