1
0
mirror of synced 2026-01-25 19:36:27 +00:00

Add installPackage() function to call the appropriate distro installation function

This commit is contained in:
Nathan
2010-05-05 14:00:03 +10:00
committed by Axel Beckert
parent 97c1bb0637
commit c0549371cc

View File

@@ -220,6 +220,28 @@ installCentOS4Package ()
}
#
# Install a package using whatever package management tool is available
#
installPackage ()
{
prefix=$1
package=$2
if [ -x ${prefix}/usr/bin/apt-get ] ; then
installDebianPackage "$@"
elif [ -x ${prefix}/usr/bin/yum ] ; then
installCentOS4Package "$@"
else
logMessage "Unable to install package ${package}; no package manager found"
fi
}
#
# Install a package upon a gentoo system via emerge.
#