Skip to content

Instantly share code, notes, and snippets.

@gregneagle
Created January 27, 2015 19:12
Show Gist options
  • Save gregneagle/0dda6afe55881c6da4f3 to your computer and use it in GitHub Desktop.
Save gregneagle/0dda6afe55881c6da4f3 to your computer and use it in GitHub Desktop.
Dist for 10.10.2 update
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<options allow-install-later="true" should-authenticate-reboot="true" post-logout="true" should-launch-first-login-optimization="true"/>
<title>SU_TITLE</title>
<script/>
<volume-check script="VolumeCheck()"/>
<installation-check script="InstallationCheck()"/>
<script>
function compareBuildVersions(lhs, rhs) {
var lhsMatch = lhs.match(/([0-9]+)([A-Z])([0-9]+)([a-z])?/);
var rhsMatch = rhs.match(/([0-9]+)([A-Z])([0-9]+)([a-z])?/);
return system.compareVersions(lhsMatch.slice(1).join(","), rhsMatch.slice(1).join(","));
}
function InstallationCheck(prefix) {
if (system.compareVersions(system.version.ProductVersion, '10.10') &lt; 0 || system.compareVersions(system.version.ProductVersion, '10.11') &gt;= 0) {
my.result.message = system.localizedStringWithFormat('ERROR_0', '10.10');
my.result.type = 'Fatal';
return false;
}
return true;
}
function VolumeCheck(prefix) {
if (system.env.OS_INSTALL == 1) return true;
var hasOS = system.files.fileExistsAtPath(my.target.mountpoint + "/System/Library/CoreServices/SystemVersion.plist");
if (!hasOS || system.compareVersions(my.target.systemVersion.ProductVersion, '10.10') &lt; 0 || system.compareVersions(my.target.systemVersion.ProductVersion, '10.11') &gt;= 0) {
my.result.message = system.localizedStringWithFormat('ERROR_0', '10.10');
my.result.type = 'Fatal';
return false;
}
if (compareBuildVersions(my.target.systemVersion.ProductBuildVersion, '14A388a') &lt; 0) {
my.result.message = system.localizedString('ERROR_2');
my.result.type = 'Fatal';
return false;
}
if (compareBuildVersions(my.target.systemVersion.ProductBuildVersion, '14B24') &gt; 0) {
my.result.message = system.localizedString('ERROR_2');
my.result.type = 'Fatal';
return false;
}
return true;
}
function PlistCheck0(prefix) {
var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
if (!plist) {
return false;
}
var plistKeyValue = plist['ProductBuildVersion'];
if (!plistKeyValue) {
return false;
}
if (system.compareVersions(plistKeyValue, '14C109') &gt;= 0) {
return false;
}
return true;
}
function PlistCheck1(prefix) {
var plist = system.files.plistAtPath(prefix + '/System/Library/CoreServices/SystemVersion.plist');
if (!plist) {
return false;
}
var plistKeyValue = plist['ProductBuildVersion'];
if (!plistKeyValue) {
return false;
}
if (system.compareVersions(plistKeyValue, '14A388a') &lt; 0) {
return false;
}
if (system.compareVersions(plistKeyValue, '14B25') &gt;= 0) {
return false;
}
return true;
}
</script>
<platforms>
<client arch="i386"/>
<server arch="i386"/>
</platforms>
<choices-outline ui="SoftwareUpdate">
<line choice="su"/>
</choices-outline>
<choices-outline>
<line choice="su"/>
</choices-outline>
<choice id="su" title="SU_TITLE" versStr="SU_VERS" description="SU_DESCRIPTION" description-mime-type="text/html" secondaryDescription="SU_SERVERCOMMENT" suDisabledGroupID="OSXUpdCombo10.10.2" start_selected="true" visible="PlistCheck0('/') &amp;&amp; PlistCheck1('/')">
<pkg-ref id="combo" auth="Root" packageIdentifier="com.apple.pkg.update.os.10.10.2.14C109.combo" onConclusion="RequireRestart">OSXUpdCombo10.10.2.pkg</pkg-ref>
<pkg-ref id="FirmwareUpdate" auth="Root" packageIdentifier="com.apple.update.firmwareupdate">FirmwareUpdate.pkg</pkg-ref>
</choice>
<localization>
<strings language="English">"SU_TITLE" = "OS X Update Combined";
"SU_VERS" = "10.10.2";
"SU_SERVERCOMMENT" = "For Desktop and Server systems";
"SU_DESCRIPTION" = '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
&lt;meta http-equiv="Content-Style-Type" content="text/css"&gt;
&lt;title&gt;&lt;/title&gt;
&lt;style type="text/css"&gt;
body {font: 11.0px Lucida Grande;}
p {margin: 0.0px 0.0px 0.0px 0.0px;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p class="p1"&gt;The OS X Yosemite 10.10.2 update is recommended for all Yosemite users. It improves the stability, compatibility, and security of your Mac.&lt;/p&gt;
&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;
&lt;p class="p1"&gt;This update:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Resolves an issue that may cause Wi-Fi to disconnect&lt;/li&gt;
&lt;li&gt;Resolves an issue that may cause web pages to load slowly&lt;/li&gt;
&lt;li&gt;Fixes an issue that caused Spotlight to load remote email content when the preference was disabled in Mail&lt;/li&gt;
&lt;li&gt;Improves audio and video sync when using Bluetooth headphones&lt;/li&gt;
&lt;li&gt;Adds the ability to browse iCloud Drive in Time Machine&lt;/li&gt;
&lt;li&gt;Improves VoiceOver speech performance&lt;/li&gt;
&lt;li&gt;Resolves an issue that causes VoiceOver to echo characters when entering text on a web page&lt;/li&gt;
&lt;li&gt;Addresses an issue that may cause the input method to switch languages unexpectedly&lt;/li&gt;
&lt;li&gt;Improves stability and security in Safari&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="p2"&gt;&lt;br&gt;&lt;/p&gt;
&lt;p class="p1"&gt;For more detailed information about this update, please visit: &lt;a href="http://support.apple.com/kb/HT204210"&gt;http://support.apple.com/kb/HT204210&lt;/a&gt;&lt;/p&gt;
&lt;p class="p1"&gt;For detailed information about the security content of this update, please visit: &lt;a href="http://support.apple.com/kb/HT1222"&gt;http://support.apple.com/kb/HT1222&lt;/a&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
';
</strings>
</localization>
<pkg-ref id="FirmwareUpdate" installKBytes="71" version="1.0.0.0.1.1422001861"/>
<pkg-ref id="combo" installKBytes="1530769" version="1.0.0.0.1.1422001861"/>
</installer-gui-script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment