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
a8cf7a95
Commit
a8cf7a95
authored
Apr 03, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: select IPFS gateway if gateway mode is forced
parent
e7390808
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
tools_eget
bin/tools_eget
+15
-9
No files found.
bin/tools_eget
View file @
a8cf7a95
...
...
@@ -550,6 +550,19 @@ check_ipfs_gateway()
return
1
}
select_ipfs_gateway
()
{
# check public http gateways
for
ipfs_gateway
in
$ipfs_gateways
;
do
check_ipfs_gateway
$ipfs_gateway
||
continue
IPFS_GATEWAY
=
"
$ipfs_gateway
"
return
done
ipfs_mode
=
"disabled"
return
1
}
select_ipfs_mode
()
{
...
...
@@ -588,15 +601,7 @@ select_ipfs_mode()
return
fi
# check public http gateways
for
ipfs_gateway
in
$ipfs_gateways
;
do
check_ipfs_gateway
$ipfs_gateway
||
continue
IPFS_GATEWAY
=
"
$ipfs_gateway
"
return
done
ipfs_mode
=
"disabled"
select_ipfs_gateway
}
...
...
@@ -668,6 +673,7 @@ if is_ipfsurl "$1" && [ -z "$ipfs_mode" ] || [ "$ipfs_mode" = "auto" ] ; then
info
"Auto selected IPFS mode:
$ipfs_mode
"
[
"
$ipfs_mode
"
=
"gateway"
]
&&
info
"Since the ipfs command is missed, the http gateway will be used."
else
[
"
$ipfs_mode
"
=
"gateway"
]
&&
select_ipfs_gateway
[
-n
"
$ipfs_mode
"
]
&&
info
"IPFS mode:
$ipfs_mode
"
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