Commit 5a66514e authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix timeout using on FreeBSD

parent 480d5a38
......@@ -324,7 +324,7 @@ done
# if input is not console, get pkg from it too
if ! inputisatty ; then
for opt in $(timeout 1 cat 2>/dev/null) ; do
for opt in $(withtimeout 1 cat) ; do
check_filenames $opt
done
fi
......
......@@ -261,6 +261,12 @@ set_sudo()
SUDO="fatal 'Can't find sudo. Please install sudo or run epm under root.'"
}
withtimeout()
{
local TO=$(which timeout 2>/dev/null || which gtimeout 2>/dev/null)
[ -n "$TO" ] && $TO $@ || $@
}
set_eatmydata()
{
# skip if disabled
......
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