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
Vladislav
eepm
Commits
a39445ea
Commit
a39445ea
authored
2 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add --get-ipfs-cid
parent
7589318c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tools_eget
bin/tools_eget
+15
-0
No files found.
bin/tools_eget
View file @
a39445ea
...
...
@@ -271,6 +271,7 @@ LISTONLY=''
CHECKURL
=
''
GETFILENAME
=
''
GETREALURL
=
''
GETIPFSCID
=
''
LATEST
=
''
SECONDLATEST
=
''
CHECKMIRRORS
=
''
...
...
@@ -375,6 +376,9 @@ while [ -n "$1" ] ; do
--get-real-url
)
GETREALURL
=
"
$1
"
;;
--get-ipfs-cid
)
GETIPFSCID
=
"
$1
"
;;
--latest
)
LATEST
=
"
$1
"
;;
...
...
@@ -936,6 +940,11 @@ sget()
local
CID
=
"
$(
get_cid_by_url
"
$REALURL
"
)
"
if
[
-n
"
$CID
"
]
;
then
if
[
-n
"
$GETIPFSCID
"
]
;
then
echo
"
$CID
"
exit
fi
if
[
-n
"
$GETFILENAME
"
]
;
then
get_filename_by_cid
"
$CID
"
exit
...
...
@@ -959,6 +968,12 @@ sget()
CID
=
"
$(
download_to_ipfs
"
$REALURL
"
)
"
||
return
if
[
-n
"
$GETIPFSCID
"
]
;
then
put_cid_and_url
"
$REALURL
"
"
$CID
"
"
$FN
"
echo
"
$CID
"
exit
fi
ipfs_get
"
$CID
"
"
$TARGET
"
||
return
put_cid_and_url
"
$REALURL
"
"
$CID
"
"
$FN
"
}
...
...
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