Skip to content

Commit

Permalink
Merge pull request #7297 from rolandwalker/mass_update_staged_path
Browse files Browse the repository at this point in the history
Mass update 36 Casks to use `staged_path` instead of `destination_path`
  • Loading branch information
rolandwalker committed Nov 13, 2014
2 parents 91e3dc6 + 2aa5e2e commit 6aff360
Show file tree
Hide file tree
Showing 36 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Casks/adobe-arh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AdobeArh < Cask
binary 'arh'

postflight do
system '/bin/chmod', '--', '755', "#{destination_path}/arh"
system '/bin/chmod', '--', '755', "#{staged_path}/arh"
end

caveats "Please refer to the documentation at #{homepage}"
Expand Down
2 changes: 1 addition & 1 deletion Casks/alib1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Alib1 < Cask
screen_saver 'Presstube-ALib1.app/Contents/Resources/Presstube - ALib1.saver'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName ALib1 (Presstube)', "#{destination_path}/presstube-alib1.app/Contents/Resources/Presstube - ALib1.saver/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName ALib1 (Presstube)', "#{staged_path}/presstube-alib1.app/Contents/Resources/Presstube - ALib1.saver/Contents/Info.plist"
end

caveats <<-EOS.undent
Expand Down
2 changes: 1 addition & 1 deletion Casks/alice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Alice < Cask
app 'Alice.app'

caveats do
path_environment_variable("#{destination_path}/Alice.app/Contents/Resources/bin")
path_environment_variable("#{staged_path}/Alice.app/Contents/Resources/bin")
end
end
2 changes: 1 addition & 1 deletion Casks/android-studio-bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class AndroidStudioBundle < Cask
app 'Android Studio.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/Android Studio.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/Android Studio.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/android-studio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class AndroidStudio < Cask
app 'Android Studio.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/Android Studio.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/Android Studio.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/appcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Appcode < Cask
app 'AppCode.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/AppCode.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/AppCode.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/bankid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Bankid < Cask

container :type => :naked
preflight do
system '/bin/mv', '--', destination_path.join('FileDownloader'), destination_path.join('bankid-latest.pkg')
system '/bin/mv', '--', staged_path.join('FileDownloader'), destination_path.join('bankid-latest.pkg')
end

pkg 'bankid-latest.pkg'
Expand Down
2 changes: 1 addition & 1 deletion Casks/chunkulus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Chunkulus < Cask
screen_saver 'presstube-chunkulus.app/Contents/Resources/Presstube - Chunkulus.saver'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName Chunkulus (Presstube)', "#{destination_path}/presstube-chunkulus.app/Contents/Resources/Presstube - Chunkulus.saver/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName Chunkulus (Presstube)', "#{staged_path}/presstube-chunkulus.app/Contents/Resources/Presstube - Chunkulus.saver/Contents/Info.plist"
end

caveats <<-EOS.undent
Expand Down
2 changes: 1 addition & 1 deletion Casks/decitime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class Decitime < Cask
# https://github.com/caskroom/homebrew-cask/pull/2654
preflight do
# todo the nested_container hack must be revised when container :nested stops being an alias around 0.50.0
system %Q{/usr/bin/hdiutil eject "$(/usr/bin/hdiutil mount -readwrite -noidme -nobrowse -mountrandom /tmp #{destination_path.join(artifacts[:nested_container].first)} | /usr/bin/cut -f3 -- - | /usr/bin/grep -- '.' -)" >/dev/null 2>&1}
system %Q{/usr/bin/hdiutil eject "$(/usr/bin/hdiutil mount -readwrite -noidme -nobrowse -mountrandom /tmp #{staged_path.join(artifacts[:nested_container].first)} | /usr/bin/cut -f3 -- - | /usr/bin/grep -- '.' -)" >/dev/null 2>&1}
end
end
4 changes: 2 additions & 2 deletions Casks/fenics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class Fenics < Cask
available when you start your shell by adding the following to the .profile
file in your home directory:
source #{destination_path}/FEniCS.app/Contents/Resources/share/fenics/fenics.conf
source #{staged_path}/FEniCS.app/Contents/Resources/share/fenics/fenics.conf
If you are using an alternate shell (e.g., zsh, csh) or a modified or brewed Python,
be sure to launch FEniCS using a clean (bash) shell.
Creating a new shell using the following command works well:
/bin/bash --rcfile #{destination_path}/FEniCS.app/Contents/Resources/share/fenics/fenics.conf
/bin/bash --rcfile #{staged_path}/FEniCS.app/Contents/Resources/share/fenics/fenics.conf
EOS
end
end
2 changes: 1 addition & 1 deletion Casks/git-annex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class GitAnnex < Cask
# This is a horrible hack to force the file extension. The
# backend code should be fixed so that this is not needed.
preflight do
system '/bin/mv', '--', destination_path.join('git-annex-latest'), destination_path.join('git-annex-latest.dmg')
system '/bin/mv', '--', staged_path.join('git-annex-latest'), destination_path.join('git-annex-latest.dmg')
end
container :nested => 'git-annex-latest.dmg'
else
Expand Down
2 changes: 1 addition & 1 deletion Casks/heart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Heart < Cask
screen_saver 'presstube-heart.app/Contents/Resources/Presstube - Heart.saver'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName Heart (Presstube)', "#{destination_path}/presstube-heart.app/Contents/Resources/Presstube - Heart.saver/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName Heart (Presstube)', "#{staged_path}/presstube-heart.app/Contents/Resources/Presstube - Heart.saver/Contents/Info.plist"
end

caveats <<-EOS.undent
Expand Down
2 changes: 1 addition & 1 deletion Casks/intellij-idea-ce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class IntellijIdeaCe < Cask
app 'IntelliJ IDEA 14 CE.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/IntelliJ IDEA 14 CE.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/IntelliJ IDEA 14 CE.app/Contents/Info.plist"
end

zap :delete => [
Expand Down
2 changes: 1 addition & 1 deletion Casks/intellij-idea.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class IntellijIdea < Cask
app 'IntelliJ IDEA 14.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/IntelliJ IDEA 14.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/IntelliJ IDEA 14.app/Contents/Info.plist"
end

zap :delete => [
Expand Down
2 changes: 1 addition & 1 deletion Casks/jabber-video.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ class JabberVideo < Cask

# todo what is the reason for this?
postflight do
system '/bin/rm', '--', "#{destination_path}/Jabber Video.app/Contents/Resources/ForcedConfig.plist"
system '/bin/rm', '--', "#{staged_path}/Jabber Video.app/Contents/Resources/ForcedConfig.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/jxplorer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Jxplorer < Cask

app "jxplorer-#{version}.app"
postflight do
system '/bin/chmod', '--', 'a+x', "#{destination_path}/jxplorer-#{version}.app/Contents/MacOS/jxplorer"
system '/bin/chmod', '--', 'a+x', "#{staged_path}/jxplorer-#{version}.app/Contents/MacOS/jxplorer"
end
end
2 changes: 1 addition & 1 deletion Casks/nodeclipse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Nodeclipse < Cask
license :oss

preflight do
system '/bin/mv', '--', destination_path.join('eclipse/Eclipse.app'), destination_path.join('eclipse/Nodeclipse.app')
system '/bin/mv', '--', staged_path.join('eclipse/Eclipse.app'), destination_path.join('eclipse/Nodeclipse.app')
end
app 'eclipse/Nodeclipse.app'
end
2 changes: 1 addition & 1 deletion Casks/openarena.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Openarena < Cask
app "openarena-#{version}/OpenArena.app"

postflight do
system '/bin/chmod', '--', '755', "#{destination_path}/openarena-#{version}/OpenArena.app/Contents/MacOS/openarena.ub"
system '/bin/chmod', '--', '755', "#{staged_path}/openarena-#{version}/OpenArena.app/Contents/MacOS/openarena.ub"
end
end
2 changes: 1 addition & 1 deletion Casks/parallels.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Parallels < Cask

postflight do
# Set the file to visible, since it was hidden in the dmg
system '/usr/bin/SetFile', '-a', 'v', destination_path.join("Parallels Desktop.app")
system '/usr/bin/SetFile', '-a', 'v', staged_path.join("Parallels Desktop.app")
end

uninstall :delete => [
Expand Down
2 changes: 1 addition & 1 deletion Casks/parse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ class Parse < Cask
binary 'parse'

postflight do
system '/bin/chmod', '--', '0755', "#{destination_path}/parse"
system '/bin/chmod', '--', '0755', "#{staged_path}/parse"
end
end
2 changes: 1 addition & 1 deletion Casks/pd-extended.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class PdExtended < Cask
app 'Pd-extended.app'

uninstall_preflight do
system '/bin/chmod', '-R', '--', 'u+w', "#{destination_path}/Pd-extended.app"
system '/bin/chmod', '-R', '--', 'u+w', "#{staged_path}/Pd-extended.app"
end
end
2 changes: 1 addition & 1 deletion Casks/phpstorm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Phpstorm < Cask
app 'PhpStorm.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/PhpStorm.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/PhpStorm.app/Contents/Info.plist"
end

zap :delete => [
Expand Down
2 changes: 1 addition & 1 deletion Casks/pycharm-ce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class PycharmCe < Cask
app 'PyCharm CE.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/PyCharm CE.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/PyCharm CE.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/pycharm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Pycharm < Cask
app 'PyCharm.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/PyCharm.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/PyCharm.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/qlmarkdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Qlmarkdown < Cask
# DSL to identify such containers and generate a target directory.
container :type => :naked
preflight do
system '/usr/bin/ditto', '-xk', '--', "#{destination_path}/QLMarkdown.qlgenerator.zip", "#{destination_path}/QLMarkdown.qlgenerator"
system '/usr/bin/ditto', '-xk', '--', "#{staged_path}/QLMarkdown.qlgenerator.zip", "#{destination_path}/QLMarkdown.qlgenerator"
end

qlplugin 'QLMarkdown.qlgenerator'
Expand Down
2 changes: 1 addition & 1 deletion Casks/quick-search-box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class QuickSearchBox < Cask

app 'Quick Search Box.app'
postflight do
system '/bin/chmod', '-R', '--', 'u+w', destination_path
system '/bin/chmod', '-R', '--', 'u+w', staged_path
end

zap :delete => '~/Library/Application Support/Google/Quick Search Box',
Expand Down
2 changes: 1 addition & 1 deletion Casks/quotefixformac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Quotefixformac < Cask
defaults write com.apple.mail BundleCompatibilityVersion -string 3
mkdir -p ~/Library/Mail/Bundles
cp -R #{destination_path}/QuoteFix.mailbundle ~/Library/Mail/Bundles/
cp -R #{staged_path}/QuoteFix.mailbundle ~/Library/Mail/Bundles/
killall Mail; open -a Mail
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion Casks/ridibooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Ridibooks < Cask

container :type => :naked
preflight do
system '/bin/mv', '--', destination_path.join('getapp'), destination_path.join('ridibooks.pkg')
system '/bin/mv', '--', staged_path.join('getapp'), destination_path.join('ridibooks.pkg')
end
pkg 'ridibooks.pkg'
uninstall :pkgutil => 'com.ridibooks.Ridibooks'
Expand Down
2 changes: 1 addition & 1 deletion Casks/rubymine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Rubymine < Cask
app 'RubyMine.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/RubyMine.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/RubyMine.app/Contents/Info.plist"
end
zap :delete => [
'~/Library/Application Support/RubyMine40',
Expand Down
2 changes: 1 addition & 1 deletion Casks/screens-connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class ScreensConnect < Cask
:pkgutil => 'com.edovia.pkg.screens.connect.*'

uninstall_preflight do
system '/bin/chmod', '+x', "#{destination_path}/Uninstall Screens Connect.app/Contents/Resources/sc-uninstaller.tool"
system '/bin/chmod', '+x', "#{staged_path}/Uninstall Screens Connect.app/Contents/Resources/sc-uninstaller.tool"
end
end
2 changes: 1 addition & 1 deletion Casks/td-toolbelt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TdToolbelt < Cask

container :type => :naked
preflight do
system '/bin/mv', '--', "#{destination_path}/mac", "#{destination_path}/td-toolbelt.pkg"
system '/bin/mv', '--', "#{staged_path}/mac", "#{destination_path}/td-toolbelt.pkg"
end

pkg 'td-toolbelt.pkg'
Expand Down
4 changes: 2 additions & 2 deletions Casks/uberpov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Uberpov < Cask
<<-EOS.undent
The standard UberPOV include path is:
#{destination_path}/Uberpov_Mac/include/
#{staged_path}/Uberpov_Mac/include/
Before starting any renders, you may want to set the include path in
UberPOV's preferences under
Expand All @@ -20,7 +20,7 @@ class Uberpov < Cask
Sample scenes will be installed at:
#{destination_path}/Uberpov_Mac/scenes/
#{staged_path}/Uberpov_Mac/scenes/
EOS
end
end
2 changes: 1 addition & 1 deletion Casks/vmware-fusion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class VmwareFusion < Cask

uninstall_preflight do
system '/usr/bin/sudo', '-E', '--',
'/usr/sbin/chown', '-R', '--', "#{Etc.getpwuid(Process.euid).name}:staff", "#{destination_path}/VMware Fusion.app"
'/usr/sbin/chown', '-R', '--', "#{Etc.getpwuid(Process.euid).name}:staff", "#{staged_path}/VMware Fusion.app"
end
zap :delete => [
# note: '~/Library/Application Support/VMware Fusion' is not safe
Expand Down
2 changes: 1 addition & 1 deletion Casks/voicemac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Voicemac < Cask

app 'VoiceMac/VoiceMac.app'
postflight do
system '/bin/chmod', '--', 'a+r', "#{destination_path}/VoiceMac/VoiceMac.app/Contents/Info.plist"
system '/bin/chmod', '--', 'a+r', "#{staged_path}/VoiceMac/VoiceMac.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/webstorm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Webstorm < Cask
app 'WebStorm.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/WebStorm.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/WebStorm.app/Contents/Info.plist"
end
end
2 changes: 1 addition & 1 deletion Casks/zeroxdbe-eap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class ZeroxdbeEap < Cask
app '0xDBE EAP.app'

postflight do
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{destination_path}/0xDBE\ EAP.app/Contents/Info.plist"
system '/usr/libexec/PlistBuddy', '-c', 'Set :JVMOptions:JVMVersion 1.6+', "#{staged_path}/0xDBE\ EAP.app/Contents/Info.plist"
end
end

0 comments on commit 6aff360

Please sign in to comment.