Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Created January 27, 2024 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrouton/69fb4344373890a6e0722c0aec7c1ba0 to your computer and use it in GitHub Desktop.
Save rtrouton/69fb4344373890a6e0722c0aec7c1ba0 to your computer and use it in GitHub Desktop.
Download recipe for Cisco Secure Client, where the expectation is that the Cisco Secure Client disk image is available for download from a URL provided in an AutoPkg override
<?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>Description</key>
<string>Downloads a Cisco Secure Client package from a specified URL.</string>
<key>Identifier</key>
<string>com.company.download.CiscoSecureClient</string>
<key>Input</key>
<dict>
<key>NAME</key>
<string>Cisco Secure Client</string>
<key>VENDOR</key>
<string>Cisco</string>
<key>DOWNLOAD_URL</key>
<string>Put_download_URL_into_AutoPkg_recipe_override</string>
</dict>
<key>MinimumVersion</key>
<string>1.0.0</string>
<key>Process</key>
<array>
<dict>
<key>Arguments</key>
<dict>
<key>predicate</key>
<string>DOWNLOAD_URL == "Put_download_URL_into_AutoPkg_recipe_override"</string>
</dict>
<key>Processor</key>
<string>StopProcessingIf</string>
</dict>
<dict>
<key>Processor</key>
<string>URLDownloader</string>
<key>Arguments</key>
<dict>
<key>url</key>
<string>%DOWNLOAD_URL%</string>
<key>request_headers</key>
<dict>
<key>user-agent</key>
<string>%DOWNLOAD_USERAGENT%</string>
<key>referer</key>
<string>%DOWNLOAD_REFERER%</string>
</dict>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>FlatPkgUnpacker</string>
<key>Arguments</key>
<dict>
<key>flat_pkg_path</key>
<string>%pathname%/Cisco Secure Client.pkg</string>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/%VENDOR%/unpack</string>
<key>purge_destination</key>
<true />
</dict>
</dict>
<dict>
<key>Processor</key>
<string>PkgPayloadUnpacker</string>
<key>Arguments</key>
<dict>
<key>pkg_payload_path</key>
<string>%RECIPE_CACHE_DIR%/%VENDOR%/unpack/vpn_module.pkg/Payload</string>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/%VENDOR%/vpn_module_payload</string>
<key>purge_destination</key>
<true />
</dict>
</dict>
<dict>
<key>Processor</key>
<string>Versioner</string>
<key>Arguments</key>
<dict>
<key>input_plist_path</key>
<string>%RECIPE_CACHE_DIR%/%VENDOR%/vpn_module_payload/Applications/Cisco/Cisco Secure Client.app/Contents/Info.plist</string>
<key>plist_version_key</key>
<string>CFBundleShortVersionString</string>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>EndOfCheckPhase</string>
</dict>
</array>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment