Skip to content

Instantly share code, notes, and snippets.

View timsutton's full-sized avatar
🍁

Timothy Sutton timsutton

🍁
View GitHub Profile
@timsutton
timsutton / TaskExecutor.py
Created February 21, 2013 16:17
TaskExecutor.py helper script from Adobe's abominable Reader 10 update pkg
#!/usr/bin/python
import sys,os,plistlib,pwd,grp,stat,urllib,subprocess,traceback,re
taskPlist = unicode(sys.argv[2], sys.getfilesystemencoding())
appPath = unicode(sys.argv[3], sys.getfilesystemencoding())
patchStore = unicode(sys.argv[4], sys.getfilesystemencoding())
binaryPath = unicode(sys.argv[5], sys.getfilesystemencoding())
CLI_mode = sys.argv[6]
title = sys.argv[7]
Synopsis:
"Check for Updates Automatically" checkbox does not disable update checks on OS X.
Full OS version:
OS X 10.7.5, OS X 10.8.2
NOTE: managedsoftwareupdate is configured to process Apple Software Updates only.
Checking Apple Software Update catalog...
Caching CatalogURL http://swscan.apple.com/content/catalogs/others/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
follow_redirects is True
HTTP/1.1 304 Not Modified
Date: Tue, 05 Mar 2013 16:16:18 GMT
Server: Apache
ETag: "1a0272-4d71edc5e4940"
Expires: Tue, 05 Mar 2013 16:17:18 GMT
Cache-Control: max-age=60
@timsutton
timsutton / AdobeAcrobatProAndReader_Settings.mobileconfig.xml
Last active November 29, 2018 15:18
Profile package for setting Adobe Acrobat/Reader settings, using Luggage for packaging.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.adobe.Reader</key>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<options visibleOnlyForPredicate="true" hostArchitectures="i386" customize="never"/>
<title>SU_TITLE</title>
<script>
</script>
<volume-check script="VolumeCheck()"/>
<installation-check script="InstallationCheck()"/>
<script>
function InstallationCheck(prefix) {
#!/usr/bin/python
import re
import urllib
import os
import subprocess
import plistlib
CHOICES_XML_ARRAY = [{'attributeSetting': False,
'choiceAttribute': 'selected',
@timsutton
timsutton / 20130314_dvtdownloadbleindex.plist
Created March 15, 2013 09:30
March 14: CLI tools v. 4.5.9 from dvtdownloadable index. Note that they actually use receipts logic to determine installed status.
<dict>
<key>dependencies</key>
<array/>
<key>fileSize</key>
<integer>118401880</integer>
<key>identifier</key>
<string>Xcode.CLTools.10.8</string>
<key>name</key>
<string>Command Line Tools</string>
<key>source</key>
@timsutton
timsutton / Java6_Apple-2013.001.plist
Created March 15, 2013 15:37
Pkginfo for JavaForOSX 2012-001
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>testing</string>
<string>production</string>
@timsutton
timsutton / getBoardIDs.py
Created March 18, 2013 18:33
Simple script to map board IDs to Mac Model names, taken from a MunkiWebAdmin/MunkiReport db.
#!/usr/bin/env python
# Print out a list of board-id to model mappings from a munkiwebadmin/munkireport
# database. Requires the machine's board-id to be present at the admin-provided condition
# called 'machine_board_id'. A custom condition script to populate this can be found at:
# https://github.com/timsutton/munki-conditions/blob/master/hardware_id
# Hardcoded assumptions:
# - script is being run from a working directory where 'munkiadmin.db' can be found
# - if a virtualenv is being used, it is already activated (ie. 'source /path/to/env/bin/activate')
MobileDevicePkgAppsToQuit
AppsToQuitBundleIdentifiers
com.apple.dt.Xcode
/usr/sbin/DevToolsSecurity
MobileDevice.pkg
Modification date of %@ in Xcode : %@
Modification date of %@ version last checked : %@
%@ does not exist!
Unable to read plist at :%@ error : %@
CFBundleVersion