Browse Source

Update zulu7.rb (#3173)

Update zulu7 to use `system_command`.
master
Miccal Matthews 8 years ago
committed by GitHub
parent
commit
ea1bf45f57
  1. 21
      Casks/zulu7.rb

21
Casks/zulu7.rb

@ -10,15 +10,20 @@ cask 'zulu7' do
pkg "Double-Click to Install Zulu #{version.major}.pkg"
postflight do
system '/usr/bin/sudo', '-E', '--',
'/bin/mv', '-f', '--', "/Library/Java/JavaVirtualMachines/zulu-#{version.major}.jdk", "/Library/Java/JavaVirtualMachines/zulu-#{version.before_comma}.jdk"
system '/usr/bin/sudo', '-E', '--',
'/bin/ln', '-nsf', '--', "/Library/Java/JavaVirtualMachines/zulu-#{version.before_comma}.jdk", "/Library/Java/JavaVirtualMachines/zulu-#{version.major}.jdk"
system_command '/bin/mv',
args: ['-f', '--', "/Library/Java/JavaVirtualMachines/zulu-#{version.major}.jdk", "/Library/Java/JavaVirtualMachines/zulu-#{version.before_comma}.jdk"],
sudo: true
system_command '/bin/ln',
args: ['-nsf', '--', "/Library/Java/JavaVirtualMachines/zulu-#{version.before_comma}.jdk", "/Library/Java/JavaVirtualMachines/zulu-#{version.major}.jdk"],
sudo: true
if MacOS.version <= :mavericks
system '/usr/bin/sudo', '-E', '--',
'/bin/rm', '-rf', '--', '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'
system '/usr/bin/sudo', '-E', '--',
'/bin/ln', '-nsf', '--', "/Library/Java/JavaVirtualMachines/zulu-#{version.before_comma}.jdk/Contents", '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'
system_command '/bin/rm',
args: ['-rf', '--', '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'],
sudo: true
system_command '/bin/ln',
args: ['-nsf', '--', "/Library/Java/JavaVirtualMachines/zulu#{version.before_comma}.jdk/Contents", '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK'],
sudo: true
end
end

Loading…
Cancel
Save