Add support for MacPorts

This commit is contained in:
ViViDboarder 2013-08-07 20:23:13 -07:00
parent f9ec8d776a
commit 5867686e88

View File

@ -135,6 +135,8 @@ package_update () {
apt-get update -y apt-get update -y
elif [ "$PACKAGE_MANAGER" == 'yum' ]; then elif [ "$PACKAGE_MANAGER" == 'yum' ]; then
yum check-update -y yum check-update -y
elif [ "$PACKAGE_MANAGER" == 'port' ]; then
port self-update
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
brew update brew update
else else
@ -166,6 +168,8 @@ package () {
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes $1 DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes $1
elif [ "$PACKAGE_MANAGER" == 'yum' ]; then elif [ "$PACKAGE_MANAGER" == 'yum' ]; then
yum install -y $1 yum install -y $1
elif [ "$PACKAGE_MANAGER" == 'port' ]; then
port install $1
elif [ "$PACKAGE_MANAGER" == 'brew' ]; then elif [ "$PACKAGE_MANAGER" == 'brew' ]; then
brew install $1 brew install $1
else else
@ -213,6 +217,8 @@ detect_package_manager () {
PACKAGE_MANAGER='apt-get' PACKAGE_MANAGER='apt-get'
elif command_exist yum; then elif command_exist yum; then
PACKAGE_MANAGER='yum' PACKAGE_MANAGER='yum'
elif command_exist port; then
PACKAGE_MANAGER='port'
elif command_exist brew; then elif command_exist brew; then
PACKAGE_MANAGER='brew' PACKAGE_MANAGER='brew'
else else