Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
eget
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
Ivan Ivlev
eget
Commits
6b129c62
Commit
6b129c62
authored
Apr 11, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add --get-response
parent
45b9fdcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
eget
eget
+10
-0
No files found.
eget
View file @
6b129c62
...
...
@@ -285,6 +285,7 @@ CURLNAMEOPTIONS='--remote-name --remote-time --remote-header-name'
LISTONLY
=
''
CHECKURL
=
''
GETRESPONSE
=
''
GETFILENAME
=
''
GETREALURL
=
''
GETIPFSCID
=
''
...
...
@@ -323,6 +324,7 @@ Options:
--list|--list-only - print only URLs
--check URL - check if the URL is accessible (returns HTTP 200 OK)
--get-response URL - get response with all headers (ever if HEAD is not acceptable)
--get-filename URL - print filename for the URL (via Content-Disposition if applicable)
--get-real-url URL - print URL after all redirects
...
...
@@ -389,6 +391,9 @@ while [ -n "$1" ] ; do
--get-filename
)
GETFILENAME
=
"
$1
"
;;
--get-response
)
GETRESPONSE
=
"
$1
"
;;
--get-real-url
)
GETREALURL
=
"
$1
"
;;
...
...
@@ -1220,6 +1225,11 @@ if [ -n "$CHECKURL" ] ; then
exit
fi
if
[
-n
"
$GETRESPONSE
"
]
;
then
url_get_response
"
$1
"
exit
fi
# separate part for github downloads
if
echo
"
$1
"
|
grep
-q
"^https://github.com/"
&&
\
...
...
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