Commit cbf3f0f2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: add verdocmd for verbose mode only output

parent 29de3208
...@@ -140,6 +140,12 @@ docmd() ...@@ -140,6 +140,12 @@ docmd()
"$@" "$@"
} }
verdocmd()
{
[ -n "$verbose" ] && showcmd "$@"
"$@"
}
# copied from epm # copied from epm
# print a path to the command if exists in $PATH # print a path to the command if exists in $PATH
...@@ -460,13 +466,13 @@ get_ipfs_brave() ...@@ -460,13 +466,13 @@ get_ipfs_brave()
ipfs_access() ipfs_access()
{ {
[ -n "$IPFS_CMD" ] || fatal "IPFS is disabled" [ -n "$IPFS_CMD" ] || fatal "IPFS is disabled"
$IPFS_CMD --api $IPFS_API $ipfs_diag_timeout diag sys >/dev/null 2>/dev/null verdocmd $IPFS_CMD --api $IPFS_API $ipfs_diag_timeout diag sys >/dev/null
} }
ipfs_check() ipfs_check()
{ {
[ -n "$IPFS_CMD" ] || fatal "IPFS is disabled" [ -n "$IPFS_CMD" ] || fatal "IPFS is disabled"
$IPFS_CMD --api $IPFS_API $ipfs_diag_timeout cat "$1" >/dev/null verdocmd $IPFS_CMD --api $IPFS_API $ipfs_diag_timeout cat "$1" >/dev/null
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment