Skip to content

Commit

Permalink
interface_package: add pkg_configure and pkg_full_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko committed Dec 14, 2024
1 parent 31a9c88 commit f78c68d
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 @@ -4,6 +4,32 @@
_pkg_have_stdin() { [[ -t 0 ]] }

declare -A module_options
module_options+=(
["pkg_configure,author"]="@dimitry-ishenko"
["pkg_configure,desc"]="Configure an unconfigured package"
["pkg_configure,example"]="pkg_configure"
["pkg_configure,feature"]="pkg_configure"
["pkg_configure,status"]="Interface"
)

pkg_configure()
{
_pkg_have_stdin && debconf-apt-progress -- dpkg --configure "$@" || dpkg --configure "$@"
}

module_options+=(
["pkg_full_upgrade,author"]="@dimitry-ishenko"
["pkg_full_upgrade,desc"]="Upgrade installed packages (potentially removing some)"
["pkg_full_upgrade,example"]="pkg_full_upgrade"
["pkg_full_upgrade,feature"]="pkg_full_upgrade"
["pkg_full_upgrade,status"]="Interface"
)

pkg_full_upgrade()
{
_pkg_have_stdin && debconf-apt-progress -- apt-get -y full-upgrade "$@" || apt-get -y full-upgrade "$@"
}

module_options+=(
["pkg_install,author"]="@dimitry-ishenko"
["pkg_install,desc"]="Install package"
Expand Down

0 comments on commit f78c68d

Please sign in to comment.