Make __package_{update_index,upgrade_all} quieter
And more non-interactive for the APT case.
This commit is contained in:
parent
5cfe569369
commit
967652b5fe
2 changed files with 12 additions and 8 deletions
|
@ -22,6 +22,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
type="$__object/parameter/type"
|
type="$__object/parameter/type"
|
||||||
|
|
||||||
if [ -f "$type" ]; then
|
if [ -f "$type" ]; then
|
||||||
type="$(cat "$type")"
|
type="$(cat "$type")"
|
||||||
else
|
else
|
||||||
|
@ -40,8 +41,8 @@ fi
|
||||||
|
|
||||||
case "$type" in
|
case "$type" in
|
||||||
yum) ;;
|
yum) ;;
|
||||||
apt) echo "apt-get update" ;;
|
apt) echo "apt-get --quiet update" ;;
|
||||||
pacman) echo "pacman --sync --refresh" ;;
|
pacman) echo "pacman --noprogressbar --sync --refresh" ;;
|
||||||
*)
|
*)
|
||||||
echo "Don't know how to manage packages on: $os" >&2
|
echo "Don't know how to manage packages on: $os" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
type="$__object/parameter/type"
|
type="$__object/parameter/type"
|
||||||
|
|
||||||
if [ -f "$type" ]; then
|
if [ -f "$type" ]; then
|
||||||
type="$(cat "$type")"
|
type="$(cat "$type")"
|
||||||
else
|
else
|
||||||
|
@ -39,18 +40,20 @@ else
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\""
|
||||||
|
|
||||||
case "$type" in
|
case "$type" in
|
||||||
yum)
|
yum)
|
||||||
echo "yum --assumeyes update"
|
echo "yum --quiet --assumeyes update"
|
||||||
echo "yum clean all"
|
echo "yum --quiet clean all"
|
||||||
;;
|
;;
|
||||||
apt)
|
apt)
|
||||||
echo "apt-get --yes dist-upgrade"
|
echo $aptget dist-upgrade
|
||||||
echo "apt-get autoclean"
|
echo "apt-get --quiet autoclean"
|
||||||
;;
|
;;
|
||||||
pacman)
|
pacman)
|
||||||
echo "pacman --noconfirm --sync --sysupgrade"
|
echo "pacman --noprogressbar --noconfirm --sync --sysupgrade"
|
||||||
echo "pacman --noconfirm --sync --clean"
|
echo "pacman --noprogressbar --noconfirm --sync --clean"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Don't know how to manage packages on: $os" >&2
|
echo "Don't know how to manage packages on: $os" >&2
|
||||||
|
|
Loading…
Reference in a new issue