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

epm-sh: fix withtimeout

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