Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nurlan
eepm
Commits
2814c50c
Commit
2814c50c
authored
4 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools_eget: fix direct download from github
parent
e31a3515
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
tools_eget
bin/tools_eget
+11
-5
No files found.
bin/tools_eget
View file @
2814c50c
...
@@ -150,7 +150,16 @@ get_github_urls()
...
@@ -150,7 +150,16 @@ get_github_urls()
grep
-i
-o
-E
'"browser_download_url": "https://.*"'
|
cut
-d
'"'
-f4
grep
-i
-o
-E
'"browser_download_url": "https://.*"'
|
cut
-d
'"'
-f4
}
}
if
echo
"
$1
"
|
grep
-q
"^https://github.com/"
;
then
# mask allowed only in the last part of path
MASK
=
$(
basename
"
$1
"
)
NOMASK
=
''
# If have no wildcard symbol like asterisk, just download
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
NOMASK
=
'1'
fi
if
echo
"
$1
"
|
grep
-q
"^https://github.com/"
&&
!
echo
"
$1
"
|
grep
-q
"/releases/download/"
;
then
MASK
=
"
$2
"
MASK
=
"
$2
"
if
[
-n
"
$LISTONLY
"
]
;
then
if
[
-n
"
$LISTONLY
"
]
;
then
...
@@ -184,11 +193,8 @@ if echo "$URL" | grep -q "[*?]" ; then
...
@@ -184,11 +193,8 @@ if echo "$URL" | grep -q "[*?]" ; then
fatal
"Error: there are globbing symbols (*?) in
$URL
"
fatal
"Error: there are globbing symbols (*?) in
$URL
"
fi
fi
# mask allowed only in the last part of path
MASK
=
$(
basename
"
$1
"
)
# If have no wildcard symbol like asterisk, just download
# If have no wildcard symbol like asterisk, just download
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
if
[
-n
"
$NOMASK
"
]
;
then
sget
"
$1
"
"
$TARGETFILE
"
sget
"
$1
"
"
$TARGETFILE
"
exit
exit
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment