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
84c23a57
Commit
84c23a57
authored
Apr 17, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: disable checking for magic CID if IPFS is used
parent
ecfd1eca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
tools_eget
bin/tools_eget
+16
-14
No files found.
bin/tools_eget
View file @
84c23a57
...
@@ -475,7 +475,7 @@ get_ipfs_brave()
...
@@ -475,7 +475,7 @@ get_ipfs_brave()
echo
"
$ipfs_brave
"
echo
"
$ipfs_brave
"
}
}
ipfs_access
()
ipfs_a
pi_a
ccess
()
{
{
[
-n
"
$IPFS_CMD
"
]
||
fatal
"IPFS is disabled"
[
-n
"
$IPFS_CMD
"
]
||
fatal
"IPFS is disabled"
verdocmd
$IPFS_CMD
--api
$IPFS_API
$ipfs_diag_timeout
diag sys
>
/dev/null
verdocmd
$IPFS_CMD
--api
$IPFS_API
$ipfs_diag_timeout
diag sys
>
/dev/null
...
@@ -495,24 +495,26 @@ select_ipfs_mode()
...
@@ -495,24 +495,26 @@ select_ipfs_mode()
# if no EGET_IPFS_API, check brave
# if no EGET_IPFS_API, check brave
if
[
-z
"
$EGET_IPFS_API
"
]
&&
[
-n
"
$IPFS_CMD
"
]
;
then
if
[
-z
"
$EGET_IPFS_API
"
]
&&
[
-n
"
$IPFS_CMD
"
]
;
then
IPFS_API
=
"
$ipfs_api_brave
"
IPFS_API
=
"
$ipfs_api_brave
"
if
ipfs_access
;
then
if
ipfs_api_access
;
then
if
ipfs_check
"
$ipfs_checkQm
"
;
then
ipfs_mode
=
"brave"
&&
return
ipfs_mode
=
"brave"
&&
return
else
#if ipfs_check "$ipfs_checkQm" ; then
info
"Skipped Brave: it is accessible via
$IPFS_CMD
--api
$IPFS_API
, but can't return shared
$ipfs_checkQm
"
# ipfs_mode="brave" && return
fi
#else
# info "Skipped Brave: it is accessible via $IPFS_CMD --api $IPFS_API, but can't return shared $ipfs_checkQm"
#fi
fi
fi
fi
fi
IPFS_CMD
=
"
$(
print_command_path ipfs
)
"
IPFS_CMD
=
"
$(
print_command_path ipfs
)
"
if
[
-n
"
$IPFS_CMD
"
]
;
then
if
[
-n
"
$IPFS_CMD
"
]
;
then
IPFS_API
=
"
$ipfs_api_local
"
IPFS_API
=
"
$ipfs_api_local
"
if
ipfs_access
;
then
if
ipfs_api_access
;
then
if
ipfs_check
"
$ipfs_checkQm
"
;
then
ipfs_mode
=
"local"
&&
return
ipfs_mode
=
"local"
&&
return
else
#if ipfs_check "$ipfs_checkQm" ; then
info
"Skipped local: it is accessible via
$IPFS_CMD
--api
$IPFS_API
, but can't return shared
$ipfs_checkQm
"
# ipfs_mode="local" && return
fi
#else
# info "Skipped local: it is accessible via $IPFS_CMD --api $IPFS_API, but can't return shared $ipfs_checkQm"
#fi
fi
fi
fi
fi
...
@@ -596,7 +598,7 @@ fi
...
@@ -596,7 +598,7 @@ fi
# detect if we run with ipfs:// or with auto
# detect if we run with ipfs:// or with auto
if
is_ipfsurl
"
$1
"
&&
[
-z
"
$ipfs_mode
"
]
||
[
"
$ipfs_mode
"
=
"auto"
]
;
then
if
is_ipfsurl
"
$1
"
&&
[
-z
"
$ipfs_mode
"
]
||
[
"
$ipfs_mode
"
=
"auto"
]
;
then
info
"Autodetecting
for
available IPFS relay..."
info
"Autodetecting available IPFS relay..."
select_ipfs_mode
select_ipfs_mode
info
"Auto selected IPFS mode:
$ipfs_mode
"
info
"Auto selected IPFS mode:
$ipfs_mode
"
else
else
...
@@ -627,14 +629,14 @@ elif [ "$ipfs_mode" = "brave" ] ; then
...
@@ -627,14 +629,14 @@ elif [ "$ipfs_mode" = "brave" ] ; then
IPFS_CMD
=
"
$(
get_ipfs_brave
)
"
||
fatal
"Can't find ipfs command in Brave"
IPFS_CMD
=
"
$(
get_ipfs_brave
)
"
||
fatal
"Can't find ipfs command in Brave"
IPFS_PRETTY_CMD
=
"~Brave-Browser/
$(
basename
$IPFS_CMD
)
"
IPFS_PRETTY_CMD
=
"~Brave-Browser/
$(
basename
$IPFS_CMD
)
"
IPFS_API
=
"
$ipfs_api_brave
"
IPFS_API
=
"
$ipfs_api_brave
"
ipfs_access
||
fatal
"Can't access to Brave IPFS API (Brave browser is not running and IPFS is not activated?)"
ipfs_a
pi_a
ccess
||
fatal
"Can't access to Brave IPFS API (Brave browser is not running and IPFS is not activated?)"
info
"Will use
$IPFS_PRETTY_CMD
--api
$IPFS_API
"
info
"Will use
$IPFS_PRETTY_CMD
--api
$IPFS_API
"
elif
[
"
$ipfs_mode
"
=
"local"
]
;
then
elif
[
"
$ipfs_mode
"
=
"local"
]
;
then
IPFS_CMD
=
"
$(
print_command_path ipfs
)
"
||
fatal
"Can't find ipfs command"
IPFS_CMD
=
"
$(
print_command_path ipfs
)
"
||
fatal
"Can't find ipfs command"
IPFS_PRETTY_CMD
=
"
$IPFS_CMD
"
IPFS_PRETTY_CMD
=
"
$IPFS_CMD
"
IPFS_API
=
"
$ipfs_api_local
"
IPFS_API
=
"
$ipfs_api_local
"
ipfs_access
||
fatal
"Can't access to IPFS API (ipfs daemon is not running?)"
ipfs_a
pi_a
ccess
||
fatal
"Can't access to IPFS API (ipfs daemon is not running?)"
info
"Will use
$IPFS_PRETTY_CMD
--api
$IPFS_API
"
info
"Will use
$IPFS_PRETTY_CMD
--api
$IPFS_API
"
elif
[
"
$ipfs_mode
"
=
"gateway"
]
;
then
elif
[
"
$ipfs_mode
"
=
"gateway"
]
;
then
...
...
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