Using result of external script
I am installing a custom X11 application. As part of that installation, I want to check if the latest version of XQuartz is present, and if not, install it. Using Packages, I imported the XQuartz package, and set it as a custom install choice. I then added a requirements entry for that package, using the “Result of External Script” option. I set the options to look for a return value “equal to” 0, and if that requirement is not met, to “make this choice unelectable” and add a tooltip. Below is my script, the XQuartz package in the custom install screen is selected and available in all cases, I was hoping someone could help me determine why this isn’t working. <script> #!/usr/bin/env bash # Package Title: Safeword SofToken II 2.2.0 # Author: Conor Schutzman <cschutzm@cisco.com> if [[ -e /Applications/Utilities/XQuartz.app ]]; then XQuartzVersion=$(defaults read "/Applications/Utilities/XQuartz.app/Contents/Info.plist" CFBundleShortVersionString) if [[ "$XQuartzVersion" = "2.7.5" ]]; then exit 1 else exit 0 fi fi exit 0 </script> Thanks, Conor _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Conor Schutzman