Skip to content

Commit

Permalink
add vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Sep 12, 2018
1 parent 126ee17 commit ff14f01
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
41 changes: 41 additions & 0 deletions cookbooks/vagrant/recipes/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash -e

function installDependencies()
{
if [[ "$(existCommand 'brew')" = 'false' ]]
then
"${APP_FOLDER_PATH}/../../brew/recipes/install.bash"
fi
}

function install()
{
initializeFolder "$(getCurrentUserHomeFolder)/Library/Caches/Homebrew"

if [[ "$(existCommand 'java')" = 'true' ]]
then
brew cask reinstall 'vagrant'
else
brew cask install 'vagrant'
fi

displayVersion "$(vagrant --version)"
}

function main()
{
APP_FOLDER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${APP_FOLDER_PATH}/../../../libraries/util.bash"

checkRequireMacSystem

header 'INSTALLING VAGRANT'

# Install

installDependencies
install
}

main "${@}"
26 changes: 26 additions & 0 deletions cookbooks/vagrant/recipes/uninstall.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -e

function uninstall()
{
if [[ "$(existCommand 'brew')" = 'true' ]]
then
brew cask uninstall 'vagrant' || true
fi
}

function main()
{
APP_FOLDER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${APP_FOLDER_PATH}/../../../libraries/util.bash"

checkRequireMacSystem

header 'INSTALLING VAGRANT'

# Uninstall

uninstall
}

main "${@}"
1 change: 1 addition & 0 deletions roles/nam/roles/macbook-pro-cli.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function main()
sudo -u "${SUDO_USER}" "${appFolderPath}/../../../cookbooks/chef-client/recipes/install.bash"
sudo -u "${SUDO_USER}" "${appFolderPath}/../../../cookbooks/jdk/recipes/install.bash"
sudo -u "${SUDO_USER}" "${appFolderPath}/../../../cookbooks/shell-check/recipes/install.bash"
sudo -u "${SUDO_USER}" "${appFolderPath}/../../../cookbooks/vagrant/recipes/install.bash"

# Non-Brew Applications

Expand Down

0 comments on commit ff14f01

Please sign in to comment.