Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Nov 12, 2020
1 parent a1a4d7d commit 81c9e2c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 29 deletions.
12 changes: 3 additions & 9 deletions cookbooks/java/recipes/post-install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ function main()
checkRequireMacSystem
checkRequireRootUser

local -r openJDKRootFolderPath="$(ls -1 -d -t '/Library/Java/JavaVirtualMachines/'openjdk-*.jdk | head -1)"
local -r openJDKHomeFolderPath='/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home'

checkExistFolder "${openJDKRootFolderPath}/Contents/Home"
checkExistFolder "${openJDKHomeFolderPath}"

# Allow Non Identified Developer

xattr -d -r 'com.apple.quarantine' "${openJDKRootFolderPath}"

# Add Dynamic Search For JAVA_HOME

local -r javaHomeConfig="export JAVA_HOME=\"\$(ls -1 -d -t '/Library/Java/JavaVirtualMachines/'openjdk-*.jdk | head -1)/Contents/Home\""
local -r javaHomeConfig="export JAVA_HOME='${openJDKHomeFolderPath}'"

appendToFileIfNotFound \
'/etc/profile' \
Expand Down
14 changes: 0 additions & 14 deletions cookbooks/java/recipes/pre-install.bash

This file was deleted.

4 changes: 1 addition & 3 deletions roles/nam/roles/mac-cli-apps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ function main()

local -r caskPackageNames=(
'chef/chef/chefdk'
'google-cloud-sdk'
'java'
'vagrant'
)

local -r packageNames=(
Expand Down Expand Up @@ -43,6 +40,7 @@ function main()
'nmap'
'node'
'nomad'
'openjdk'
'packer'
'python3'
'redis'
Expand Down
4 changes: 2 additions & 2 deletions tools/install-brew-applications.bash
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ function installBrewPackage()
header "INSTALLING CASK PACKAGE ${packageNameForHeader}"

brew reinstall --force "${packageName}"
displayVersion "$(brew list --"${packageType}" --version "${packageName}")" "${packageNameForHeader}"
displayVersion "$(brew list --version "${packageName}" --"${packageType}")" "${packageNameForHeader}"
else
header "INSTALLING BREW PACKAGE ${packageNameForHeader}"

brew reinstall "${packageName}"
brew reinstall --force "${packageName}"
displayVersion "$(brew list --version "${packageName}")" "${packageNameForHeader}"
fi

Expand Down
2 changes: 1 addition & 1 deletion tools/update-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function main()
softwareupdate --list

header 'UPDATING SOFTWARE'
softwareupdate --all --install --force
softwareupdate --all --force --install
}

main "${@}"

0 comments on commit 81c9e2c

Please sign in to comment.