Skip to content

Commit

Permalink
interface_package: add pkg_update and pkg_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko committed Dec 13, 2024
1 parent 97807a4 commit 02f1864
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tools/modules/functions/interface_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
}

0 comments on commit 02f1864

Please sign in to comment.