Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Created May 23, 2022 14:05
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/0f9467123afd98c6d0bb0d675d7f3b27 to your computer and use it in GitHub Desktop.
Save rtrouton/0f9467123afd98c6d0bb0d675d7f3b27 to your computer and use it in GitHub Desktop.
Download recipe for Cisco AnyConnect, where the expectation is that the Cisco AnyConnect 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 AnyConnect package from a specified URL.</string>
<key>Identifier</key>
<string>com.company.download.CiscoAnyConnect</string>
<key>Input</key>
<dict>
<key>NAME</key>
<string>Cisco AnyConnect Secure Mobility 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%/AnyConnect.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 AnyConnect Secure Mobility 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