Change Brew's Caskroom location.

This commit is contained in:
Scott Wallace 2016-06-13 08:49:46 +01:00
parent a2521e8e83
commit 854ab0858d
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
[ ! -x "$(which brew 2>/dev/null)" -a ! -d /opt/homebrew-cask ] && exit 1 [ ! -x "$(which brew 2>/dev/null)" -a ! -d /opt/homebrew-cask ] && exit 1
function __remove-cask { function __remove-cask {
caskBasePath="/opt/homebrew-cask/Caskroom" caskBasePath="/usr/local/Caskroom"
local cask="$1" local cask="$1"
local caskDirectory="$caskBasePath/$cask" local caskDirectory="$caskBasePath/$cask"
local versionsToRemove="$(ls -r $caskDirectory | sed 1,1d)" local versionsToRemove="$(ls -r $caskDirectory | sed 1,1d)"

View file

@ -68,7 +68,7 @@ IO.popen('brew cask list') do |apps|
# APPLICATION FILENAME # APPLICATION FILENAME
appname = appname[1].strip appname = appname[1].strip
fullpath = `mdfind -onlyin /opt/homebrew-cask/Caskroom -onlyin /Applications -onlyin ~/Applications "#{appname}" | grep "#{appname}"`.strip fullpath = `mdfind -onlyin /usr/local/Caskroom -onlyin /Applications -onlyin ~/Applications "#{appname}" | grep "#{appname}"`.strip
if File.exist?(fullpath) if File.exist?(fullpath)
# GET APPLICATION VERSION WITH SPOTLIGHT # GET APPLICATION VERSION WITH SPOTLIGHT
if currentmatch = /([A-z0-9\.]+)/.match(`mdls "#{fullpath}" -name kMDItemVersion -raw`) if currentmatch = /([A-z0-9\.]+)/.match(`mdls "#{fullpath}" -name kMDItemVersion -raw`)