Update java-jdk-javadoc: uninstall_postflight (#40616)
* Update java-jdk-javadoc: uninstall_postflight * remove uninstall caveat
This commit is contained in:
parent
b43ac10dca
commit
20e3c3a952
|
@ -19,6 +19,7 @@ cask 'java-jdk-javadoc' do
|
||||||
|
|
||||||
uninstall_postflight do
|
uninstall_postflight do
|
||||||
`/usr/libexec/java_home -v #{version.before_comma} -X | grep -B0 -A1 JVMHomePath | sed -n -e 's/[[:space:]]*<string>\\(.*\\)<\\/string>/\\1/p'`.split("\n").each do |path|
|
`/usr/libexec/java_home -v #{version.before_comma} -X | grep -B0 -A1 JVMHomePath | sed -n -e 's/[[:space:]]*<string>\\(.*\\)<\\/string>/\\1/p'`.split("\n").each do |path|
|
||||||
|
next unless File.exist?("#{path}/docs")
|
||||||
system_command '/bin/rm',
|
system_command '/bin/rm',
|
||||||
args: ['-rf', "#{path}/docs"],
|
args: ['-rf', "#{path}/docs"],
|
||||||
sudo: true
|
sudo: true
|
||||||
|
@ -30,7 +31,5 @@ cask 'java-jdk-javadoc' do
|
||||||
License Agreement for Java SE at
|
License Agreement for Java SE at
|
||||||
|
|
||||||
https://www.oracle.com/technetwork/java/javase/terms/license/index.html
|
https://www.oracle.com/technetwork/java/javase/terms/license/index.html
|
||||||
|
|
||||||
#{token} will be uninstalled when the Java Cask is uninstalled or reinstalled
|
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue