Commit 48d4628d authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-install: add non interactive install task (--auto support)

parent 88272a83
......@@ -616,15 +616,35 @@ epm_print_install_names_command()
esac
}
# apt-repo with non_interactive support
apt_repo_prepare()
{
assure_exists apt-repo
[ -n "$non_interactive" ] || return
set_sudo
trap "$SUDO rm /etc/apt/apt.conf.d/eepm-apt-noninteractive.conf 2>/dev/null" EXIT
echo 'APT::Get::Assume-Yes "true";' | $SUDO tee /etc/apt/apt.conf.d/eepm-apt-noninteractive.conf >/dev/null
}
apt_repo_after()
{
[ -n "$non_interactive" ] || return
$SUDO rm /etc/apt/apt.conf.d/eepm-apt-noninteractive.conf 2>/dev/null
}
epm_install()
{
if [ "$BASEDISTRNAME" = "alt" ] ; then
if tasknumber "$pkg_names" >/dev/null ; then
assure_exists apt-repo
# TODO: add --auto support
local res
# TODO: don't use apt-repo
apt_repo_prepare
sudocmd_foreach "apt-repo test" $(tasknumber $pkg_names)
return
res=$?
apt_repo_after
return $res
fi
fi
......
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