Commit 20b74e97 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: use eatmydata if installed (set EPMNOEATMYDATA for skip)

parent 02b2e935
......@@ -37,6 +37,7 @@ load_helper epm-sh-functions
#PATH=$PATH:/sbin:/usr/sbin
set_sudo
set_eatmydata
check_tty
......
......@@ -219,6 +219,16 @@ set_sudo()
SUDO="fatal 'Can't find sudo. Please install sudo or run epm under root.'"
}
set_eatmydata()
{
# skip if disabled
[ -n "$EPMNOEATMYDATA" ] && return
# use if possible
which eatmydata >/dev/null 2>/dev/null || return
SUDO="$SUDO eatmydata"
echo "Uwaga! eatmydata is installed, we will use it for disable all sync operations."
}
assure_exists()
{
PATH=$PATH:/sbin:/usr/sbin which $1 2>/dev/null >/dev/null && return
......
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