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 3941b55 commit a5de88e
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 a5de88e

Please sign in to comment.