Created
October 24, 2019 07:35
-
-
Save b0gdanw/4de1ccb10ea846e36bb790f09a6a31e9 to your computer and use it in GitHub Desktop.
Java for OS X 2017-001 on macOS Catalina 10.15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download Java for OS X 2017-001 https://support.apple.com/kb/DL1572 | |
set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"} | |
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG & " -noverify -nobrowse" | |
do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp" | |
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/" | |
do shell script "sed -i '' 's/return false/return true/g' ~/tmp/Distribution" | |
do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg" | |
do shell script "rm -rf ~/tmp" | |
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment