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
8bf0f2d4
Commit
8bf0f2d4
authored
Apr 17, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add support for -O- and -O/dev/stdout
parent
1015878c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
tools_eget
bin/tools_eget
+10
-3
No files found.
bin/tools_eget
View file @
8bf0f2d4
...
@@ -156,12 +156,14 @@ __wget()
...
@@ -156,12 +156,14 @@ __wget()
# put remote content to stdout
# put remote content to stdout
scat
()
scat
()
{
{
__wget
$WGETNOSSLCHECK
-O-
"
$1
"
__wget
-O-
"
$1
"
}
}
# download to default name of to $2
# download to default name of to $2
sget
()
sget
()
{
{
if
[
-n
"
$2
"
]
;
then
if
[
"
$2
"
=
"/dev/stdout"
]
||
[
"
$2
"
=
"-"
]
;
then
scat
"
$1
"
elif
[
-n
"
$2
"
]
;
then
docmd __wget
-O
"
$2
"
"
$1
"
docmd __wget
-O
"
$2
"
"
$1
"
else
else
# TODO: поддержка rsync для известных хостов?
# TODO: поддержка rsync для известных хостов?
...
@@ -191,7 +193,9 @@ scat()
...
@@ -191,7 +193,9 @@ scat()
# download to default name of to $2
# download to default name of to $2
sget
()
sget
()
{
{
if
[
-n
"
$2
"
]
;
then
if
[
"
$2
"
=
"/dev/stdout"
]
||
[
"
$2
"
=
"-"
]
;
then
scat
"
$1
"
elif
[
-n
"
$2
"
]
;
then
__curl
--output
"
$2
"
"
$1
"
__curl
--output
"
$2
"
"
$1
"
else
else
__curl
$CURLNAMEOPTIONS
"
$1
"
__curl
$CURLNAMEOPTIONS
"
$1
"
...
@@ -237,6 +241,9 @@ TARGETFILE=''
...
@@ -237,6 +241,9 @@ TARGETFILE=''
if
[
"
$1
"
=
"-O"
]
;
then
if
[
"
$1
"
=
"-O"
]
;
then
TARGETFILE
=
"
$2
"
TARGETFILE
=
"
$2
"
shift
2
shift
2
elif
[
"
$1
"
=
"-O-"
]
;
then
TARGETFILE
=
"-"
shift
1
fi
fi
# TODO:
# TODO:
...
...
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