Commit 386cde0a authored by Vitaly Lipatov's avatar Vitaly Lipatov

add is_url and use it

parent a921ca59
...@@ -490,7 +490,7 @@ check_filenames() ...@@ -490,7 +490,7 @@ check_filenames()
elif [ -d "$opt" ] ; then elif [ -d "$opt" ] ; then
has_space "$opt" && warning "There are space(s) in directory path '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning "There are space(s) in directory path '$opt', it is not supported. Skipped" && continue
pkg_dirs="$pkg_dirs $opt" pkg_dirs="$pkg_dirs $opt"
elif echo "$opt" | grep -q "^[fhtps]*://" ; then elif is_url "$opt" ; then
has_space "$opt" && warning "There are space(s) in URL '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning "There are space(s) in URL '$opt', it is not supported. Skipped" && continue
pkg_urls="$pkg_urls $opt" pkg_urls="$pkg_urls $opt"
else else
......
...@@ -678,6 +678,11 @@ has_space() ...@@ -678,6 +678,11 @@ has_space()
estrlist -- has_space "$@" estrlist -- has_space "$@"
} }
is_url()
{
echo "$1" | grep -q "^[fhtps]*://"
}
# compatibility layer # compatibility layer
# add realpath if missed # add realpath if missed
if ! which realpath 2>/dev/null >/dev/null ; then if ! which realpath 2>/dev/null >/dev/null ; 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