Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Oct 23, 2016
1 parent 4f49091 commit 5aa59ef
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions cookbooks/brew/attributes/default.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -e

export BREW_DOWNLOAD_URL='https://github.com/Homebrew/brew/tarball/master'

export BREW_INSTALL_FOLDER='/Volumes/Data/Applications/brew'
5 changes: 5 additions & 0 deletions cookbooks/go-lang/attributes/default.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

export GO_LANG_DOWNLOAD_URL='https://storage.googleapis.com/golang/go1.7.3.darwin-amd64.tar.gz'

export GO_LANG_INSTALL_FOLDER='/Volumes/Data/Applications/go-lang'
40 changes: 40 additions & 0 deletions cookbooks/go-lang/recipes/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash -e

function install()
{
# Clean Up

initializeFolder "${GO_LANG_INSTALL_FOLDER}"

# Install

unzipRemoteFile "${GO_LANG_DOWNLOAD_URL}" "${GO_LANG_INSTALL_FOLDER}"
chown -R "${SUDO_USER}:$(getUserGroupName "${SUDO_USER}")" "${GO_LANG_INSTALL_FOLDER}"
symlinkLocalBin "${GO_LANG_INSTALL_FOLDER}/bin"
ln -f -s "${GO_LANG_INSTALL_FOLDER}" '/usr/local/go'

# Display Version

export GOROOT="${GO_LANG_INSTALL_FOLDER}"
displayVersion "$(go version)"
}

function main()
{
local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${appFolderPath}/../../../libraries/util.bash"
source "${appFolderPath}/../attributes/default.bash"

checkRequireMacSystem
checkRequireRootUser

header 'INSTALLING GO-LANG'

# Install

install
installCleanUp
}

main "${@}"
5 changes: 5 additions & 0 deletions cookbooks/jq/attributes/default.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

export JQ_DOWNLOAD_URL='https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64'

export JQ_INSTALL_FOLDER='/Volumes/Data/Applications/jq'
38 changes: 38 additions & 0 deletions cookbooks/jq/recipes/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash -e

function install()
{
# Clean Up

initializeFolder "${JQ_INSTALL_FOLDER}"
mkdir -p "${JQ_INSTALL_FOLDER}/bin"

# Install

downloadFile "${JQ_DOWNLOAD_URL}" "${JQ_INSTALL_FOLDER}/bin/jq" 'true'
chown -R "${SUDO_USER}:$(getUserGroupName "${SUDO_USER}")" "${JQ_INSTALL_FOLDER}"
chmod 755 "${JQ_INSTALL_FOLDER}/bin/jq"
symlinkLocalBin "${JQ_INSTALL_FOLDER}/bin"

# Display Version

displayVersion "$("${JQ_INSTALL_FOLDER}/bin/jq" --version)"
}

function main()
{
local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

source "${appFolderPath}/../../../libraries/util.bash"
source "${appFolderPath}/../attributes/default.bash"

checkRequireMacSystem
checkRequireRootUser

header 'INSTALLING JQ'

install
installCleanUp
}

main "${@}"
2 changes: 2 additions & 0 deletions roles/macbook-pro.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ function main()
local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

"${appFolderPath}/../cookbooks/brew/recipes/install.bash"
"${appFolderPath}/../cookbooks/go-lang/recipes/install.bash"
"${appFolderPath}/../cookbooks/jq/recipes/install.bash"
"${appFolderPath}/../cookbooks/packer/recipes/install.bash"
"${appFolderPath}/../cookbooks/shell-check/recipes/install.bash"
}
Expand Down

0 comments on commit 5aa59ef

Please sign in to comment.