Skip to content

Commit

Permalink
update lib to support RedHat
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Aug 8, 2016
1 parent e821df7 commit ee5c997
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions libraries/util.bash
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ function installCommands()
{
local -r data=("${@}")

runAptGetUpdate ''
if [[ "$(isUbuntuDistributor)" = 'true' ]]
then
runAptGetUpdate ''
fi

local i=0

Expand All @@ -413,7 +416,15 @@ function installCommands()

if [[ "$(existCommand "${command}")" = 'false' ]]
then
installAptGetPackages "${package}"
if [[ "$(isUbuntuDistributor)" = 'true' ]]
then
installAptGetPackages "${package}"
elif [[ "$(isRedHatDistributor)" = 'true' ]]
then
yum install -y "${package}"
else
fatal '\nFATAL : only support RedHat or Ubuntu OS'
fi
fi
done
}
Expand Down

0 comments on commit ee5c997

Please sign in to comment.