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
etersoft
eepm
Commits
d8c62de7
Commit
d8c62de7
authored
Apr 10, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: rewrite get_filename with get_real_url
parent
4d6a88da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
tools_eget
bin/tools_eget
+8
-14
No files found.
bin/tools_eget
View file @
d8c62de7
...
...
@@ -769,6 +769,9 @@ url_get_real_url()
url_get_filename
()
{
local
URL
=
"
$1
"
!
is_httpurl
"
$URL
"
&&
basename
"
$URL
"
&&
return
# FIXME with wget
local cd
=
"
$(
url_get_header
"
$URL
"
"Content-Disposition"
)
"
if
echo
"
$cd
"
|
grep
-q
"filename="
;
then
...
...
@@ -777,13 +780,7 @@ url_get_filename()
return
fi
local
loc
=
"
$(
url_get_header
"
$URL
"
"Location"
|
tail
-n1
)
"
if
is_url
"
$loc
"
;
then
basename
"
$loc
"
return
fi
basename
"
$URL
"
basename
"
$(
url_get_real_url
"
$URL
"
)
"
}
else
...
...
@@ -860,6 +857,9 @@ url_get_real_url()
url_get_filename
()
{
local
URL
=
"
$1
"
!
is_httpurl
"
$URL
"
&&
basename
"
$URL
"
&&
return
# FIXME with wget
local cd
=
"
$(
url_get_header
"
$URL
"
"content-disposition"
)
"
if
echo
"
$cd
"
|
grep
-q
"filename="
;
then
...
...
@@ -868,13 +868,7 @@ url_get_filename()
return
fi
local
loc
=
"
$(
url_get_header
"
$URL
"
"location"
|
tail
-n1
)
"
if
is_url
"
$loc
"
;
then
basename
"
$loc
"
return
fi
basename
"
$URL
"
basename
"
$(
url_get_real_url
"
$URL
"
)
"
}
...
...
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