From a5de88e4c88e61c278f4e2e970cee4d35b6037bf Mon Sep 17 00:00:00 2001 From: Dimitry Ishenko Date: Fri, 13 Dec 2024 15:40:26 -0500 Subject: [PATCH] interface_package: add pkg_update and pkg_upgrade --- tools/modules/functions/interface_package.sh | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/modules/functions/interface_package.sh b/tools/modules/functions/interface_package.sh index 38fc0399..36eaed31 100644 --- a/tools/modules/functions/interface_package.sh +++ b/tools/modules/functions/interface_package.sh @@ -43,3 +43,29 @@ pkg_remove() { __pkg_have_stdin && debconf-apt-progress -- apt-get -y autopurge "$@" || apt-get -y autopurge "$@" } + +module_options+=( + ["package,author"]="@dimitry-ishenko" + ["package,desc"]="Update package repository" + ["package,example"]="pkg_update" + ["package,feature"]="pkg_update" + ["package,status"]="Interface" +) + +pkg_update() +{ + __pkg_have_stdin && debconf-apt-progress -- apt-get -y update "$@" || apt-get -y update "$@" +} + +module_options+=( + ["package,author"]="@dimitry-ishenko" + ["package,desc"]="Upgrade installed packages" + ["package,example"]="pkg_upgrade" + ["package,feature"]="pkg_upgrade" + ["package,status"]="Interface" +) + +pkg_upgrade() +{ + __pkg_have_stdin && debconf-apt-progress -- apt-get -y upgrade "$@" || apt-get -y upgrade "$@" +}