diff options
Diffstat (limited to 'bootstrap/vagrant-onap/lib/commons')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/commons | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/lib/commons b/bootstrap/vagrant-onap/lib/commons index 019eeb5c2..26e2cc26a 100755 --- a/bootstrap/vagrant-onap/lib/commons +++ b/bootstrap/vagrant-onap/lib/commons @@ -31,6 +31,13 @@ function is_package_installed { dpkg -s "$@" > /dev/null 2> /dev/null } +# install_packages() - Install a list of packages +function install_packages { + local package=$@ + update_repos + apt-get install -y -qq $package +} + # install_package() - Install specific package if doesn't exist function install_package { local package=$1 @@ -39,3 +46,17 @@ function install_package { apt-get install -y -qq $package fi } + +# uninstall_packages() - Uninstall a list of packages +function uninstall_packages { + local packages=$@ + apt-get purge -y -qq $packages +} + +# uninstall_package() - Uninstall specific package if exists +function uninstall_package { + local package=$1 + if is_package_installed $package; then + apt-get purge -y -qq $package + fi +} |