Using result of external script
Using result of external script
- Subject: Using result of external script
- From: Conor Schutzman <email@hidden>
- Date: Mon, 06 Jan 2014 12:21:58 -0800
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 <email@hidden>
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden