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
5777679e
Commit
5777679e
authored
Apr 03, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: use Content-disposition for downloaded filename
parent
383cb1a4
Show 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 @
5777679e
...
...
@@ -105,6 +105,8 @@ check_tty
WGETQ
=
''
#-q
CURLQ
=
''
#-s
WGETOPTIONS
=
'--content-disposition'
CURLOPTIONS
=
'--remote-name --remote-header-name'
set_quiet
()
{
...
...
@@ -125,15 +127,19 @@ if [ -n "$WGET" ] ; then
# put remote content to stdout
scat
()
{
$WGET
$WGETQ
-O-
"
$1
"
docmd
$WGET
$WGETQ
-O-
"
$1
"
}
# download to default name of to $2
sget
()
{
if
[
-n
"
$2
"
]
;
then
$WGET
$WGETQ
-O
"
$2
"
"
$1
"
docmd
$WGET
$WGETQ
$WGETOPTIONS
-O
"
$2
"
"
$1
"
else
$WGET
$WGETQ
"
$1
"
# TODO: поддержка rsync для известных хостов?
# Не качать, если одинаковый размер и дата
# -nc
# TODO: overwrite always
docmd
$WGET
$WGETQ
$WGETOPTIONS
"
$1
"
fi
}
...
...
@@ -149,9 +155,9 @@ scat()
sget
()
{
if
[
-n
"
$2
"
]
;
then
$CURL
-L
$CURLQ
--output
"
$2
"
"
$1
"
docmd
$CURL
-L
$CURLQ
$CURLOPTIONS
--output
"
$2
"
"
$1
"
else
$CURL
-L
$CURLQ
-O
"
$1
"
docmd
$CURL
-L
$CURLQ
$CURLOPTIONS
-O
"
$1
"
fi
}
fi
...
...
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