Commit ff216f8d authored by Vitaly Lipatov's avatar Vitaly Lipatov

add check for sed, which and grep commands

parent c9ec915d
......@@ -19,6 +19,14 @@
# copied from /etc/init.d/outformat (ALT Linux)
check_core_commands()
{
which --help >/dev/null || fatal "Can't find which command (which package is missed?)"
grep --help >/dev/null || fatal "Can't find grep command (coreutils package is missed?)"
sed --help >/dev/null || fatal "Can't find sed command (sed package is missed?)"
}
# FIXME on Android: FIX ME! implement ttyname_r() bionic/libc/bionic/stubs.c:366
inputisatty()
{
......@@ -47,6 +55,8 @@ check_tty()
[ -n "$TERM" ] || TERM=dumb
export TERM
check_core_commands
# egrep from busybox may not --color
# egrep from MacOS print help to stderr
if grep -E --help 2>&1 | grep -q -- "--color" ; then
......@@ -364,9 +374,10 @@ withtimeout()
$TO "$@"
return
fi
fatal "Possible indefinite wait due timeout command is missed"
# fallback: drop time arg and run without timeout
shift
"$@"
#shift
#"$@"
}
set_eatmydata()
......
......@@ -29,6 +29,8 @@ Provides: epm = %EVR
Requires: apt rpm
%endif
Requires: which
%description
Etersoft EPM is the package manager for any platform
and any platform version. It provides
......
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