Commit b669a4ea authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: small rearrange

parent 56379277
...@@ -420,6 +420,7 @@ check_url_is_accessible() ...@@ -420,6 +420,7 @@ check_url_is_accessible()
fi fi
get_github_urls() get_github_urls()
{ {
# https://github.com/OWNER/PROJECT # https://github.com/OWNER/PROJECT
...@@ -487,6 +488,8 @@ if [ -n "$CHECKURL" ] ; then ...@@ -487,6 +488,8 @@ if [ -n "$CHECKURL" ] ; then
exit exit
fi fi
# separate part for github downloads
if echo "$1" | grep -q "^https://github.com/" && \ if echo "$1" | grep -q "^https://github.com/" && \
echo "$1" | grep -q -v "/download/" && [ -n "$2" ] ; then echo "$1" | grep -q -v "/download/" && [ -n "$2" ] ; then
MASK="$2" MASK="$2"
...@@ -505,9 +508,6 @@ if echo "$1" | grep -q "^https://github.com/" && \ ...@@ -505,9 +508,6 @@ if echo "$1" | grep -q "^https://github.com/" && \
fi fi
# mask allowed only in the last part of path
MASK=$(basename "$1")
# if mask is the second arg # if mask is the second arg
if [ -n "$2" ] ; then if [ -n "$2" ] ; then
URL="$1" URL="$1"
...@@ -520,6 +520,8 @@ else ...@@ -520,6 +520,8 @@ else
# drop mask part # drop mask part
URL="$(dirname "$1")/" URL="$(dirname "$1")/"
# wildcards allowed only in the last part of path
MASK=$(basename "$1")
fi fi
if echo "$URL" | grep -q "[*?]" ; then if echo "$URL" | grep -q "[*?]" ; 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