Commit 7696a7fc authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh: fix withtimeout

parent 2bccd0ef
...@@ -267,8 +267,11 @@ set_sudo() ...@@ -267,8 +267,11 @@ set_sudo()
withtimeout() withtimeout()
{ {
local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null) local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null)
[ -n "$TO" ] && $TO $@ && return if [ -x "$TO" ] ; then
# drop time arg $TO $@
return
fi
# fallback: drop time arg and run without timeout
shift shift
$@ $@
} }
......
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