One method of upgrading your customized Setup Your Mac script to the latest version
Introduction
Apple’s Automated Device Enrollment helps streamline Mobile Device Management (MDM) enrollment and device Supervision during activation, enabling IT to manage enterprise devices with “zero touch.”
Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
Release Cycle
For each of the last several months, an updated version of Setup Your Mac has been released (and reviewing SYM’s CHANGELOG shows it).
Many Mac Admins share the same sentiment:
I’d like to upgrade to the latest version, but there doesn’t seem to be an easy way to both use the new features and maintain my customizations.
Upgrading
National Chili Day 2024 Update
While responding to a feature request, it just dawned on me that if you’ve built your Configurations with SYM-Helper.app, you can use it to easily upgrade to the latest version of
Setup-Your-Mac-via-Dialog.bash
The following high-level overview is written for Visual Studio Code; James Smith has an excellent presentation on Visual Studio Code for Mac Admins.
A. Download and Duplicate
Complete the following steps on your primary Mac:
- Open the macOS Terminal.
- Download the latest production version of Setup Your Mac using the following command.
- The script will be saved to your Downloads folder as:
Setup-Your-Mac-via-Dialog-YYYY-MM-DD-HHMMSS.bash
- View the current available branches to download the latest version
- The script will be saved to your Downloads folder as:
timestamp=$( date '+%Y-%m-%d-%H%M%S' ) ; curl -o ~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash https://raw.githubusercontent.com/setup-your-mac/Setup-Your-Mac/main/Setup-Your-Mac-via-Dialog.bash
- Determine the
scriptVersion
using the following command:
awk -F"=" '/scriptVersion/{print $NF;exit;}' ~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash
- Duplicate your current Setup Your Mac script, appending the value of
scriptVersion
B. Compare files in Visual Studio Code
Refer to the Upgrading Setup Your Mac screencast when completing the following steps.
- If necessary, download Visual Studio Code
- Open the following files
- Your duplicated, renamed, customized Setup Your Mac script
~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash
- Click the Explorer button (Command-Shift-E)
- If necessary, enable “Open Editors” in Explorer’s options
- Individually right-click the files listed in the Open Editors to begin the comparison
- Select for Compare:
~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash
- Compare with Selected: Your duplicated, renamed, customized Setup Your Mac script
- Select for Compare:
- Close the Explorer
- Review each difference — shown in red — then click the right-facing arrow to replace the code in your duplicated, renamed, customized Setup Your Mac script with the code in
~/Downloads/Setup-Your-Mac-via-Dialog-$timestamp.bash
- Notes:
- You can safely ignore any differences in
policyJSON
- Enabling View > Word Wrap can interfere with code comparison
- You can safely ignore any differences in
- Notes:
Pingback:Setup Your Mac (1.10.0) via swiftDialog - Dan K. Snelson