Skip to content

Commit 8f882c0

Browse files
committed
1.15.0-b6
Signed-off-by: Dan K. Snelson <[email protected]>
1 parent 129186d commit 8f882c0

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# CHANGELOG
22

33
## 1.15.0
4-
### 17-Apr-2024
4+
### 28-May-2024
55
- Added logging functions [Pull Request No. 137](https://github.com/setup-your-mac/Setup-Your-Mac/pull/137); thanks, @robjschroeder!
66
- Modified Microsoft Teams Message `activitySubtitle`
77
- Activated main "Setup Your Mac" dialog with each `listitem`
8+
- Added swiftDialog `2.5.0` `--verbose` flag to `verbose` debugMode
9+
- Failure Message: Increased `sleep` value from `0.3` to `0.7` (thanks, for the report, @arnoldtaw; thanks for the code suggestion, @jcmbowman)
10+
- Miscellaneous formatting and clean-up
811

912
## 1.14.2
1013
### 15-Feb-2024

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
### Humbled & Amazed
1717

1818
The response to Setup Your Mac has been both humbling and amazing; my personal thanks to MacAdmins worldwide and the ever-growing number of contributors:
19+
- jcmbowman for suggesting a fix to arnoldtaw's [Issue No. 149](https://github.com/setup-your-mac/Setup-Your-Mac/issues/149)
1920
- robjschroeder for [Pull Request No. 137](https://github.com/setup-your-mac/Setup-Your-Mac/pull/137)
2021
- Mazi for helping to identify a logging typo in "Log Out Attended" completionActionOption
2122
- drtaru for [Pull Request No. 140](https://github.com/setup-your-mac/Setup-Your-Mac/pull/140)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!-- markdownlint-disable-next-line first-line-heading no-inline-html -->
22
[<img align="left" alt="Setup Your Mac (1.14.0)" src="images/SYM_icon.png" width="128" />](https://snelson.us/sym)
33

4-
# Setup Your Mac (1.15.0) with SYM-Helper (1.1.1) via swiftDialog (2.4.2)
4+
# Setup Your Mac (1.15.0) with SYM-Helper (1.1.2) via swiftDialog (2.5.0)
55

66
![GitHub release (latest by date)](https://img.shields.io/github/v/release/dan-snelson/Setup-Your-Mac?display_name=tag) ![GitHub issues](https://img.shields.io/github/issues-raw/dan-snelson/Setup-Your-Mac) ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/dan-snelson/Setup-Your-Mac) ![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/dan-snelson/Setup-Your-Mac) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/dan-snelson/Setup-Your-Mac)
77

8-
> Optimized to leverage SYM-Helper (1.1.1), Setup Your Mac (1.15.0) leverages new features of swiftDialog (2.4.2)
8+
> Optimized to leverage SYM-Helper (1.1.2), Setup Your Mac (1.15.0) leverages new features of swiftDialog (2.5.0)
99
1010
[<img alt="Setup Your Mac (1.15.0)" src="images/SYM-Helper_1.1.1_SYM-1.14.0_Hero.png" />](https://snelson.us/sym)
1111

Setup-Your-Mac-via-Dialog.bash

+25-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# shellcheck disable=SC2001,SC1111,SC1112,SC2143,SC2145,SC2086,SC2089,SC2090
2+
# shellcheck disable=SC2001,SC1111,SC1112,SC2143,SC2145,SC2086,SC2089,SC2090,SC2269
33

44
####################################################################################################
55
#
@@ -10,10 +10,13 @@
1010
#
1111
# HISTORY
1212
#
13-
# Version 1.15.0, 17-Mar-2024
13+
# Version 1.15.0, 28-May-2024
1414
# - Added logging functions
1515
# - Modified Microsoft Teams Message `activitySubtitle`
16-
# - Activated main "Setup Your Mac" dialog with each `listitem`
16+
# - Activated main "Setup Your Mac" dialog with each `listitem`
17+
# - Added swiftDialog `2.5.0` `--verbose` flag to `verbose` debugMode
18+
# - Failure Message: Increased `sleep` value from `0.3` to `0.7` (thanks, for the report, @arnoldtaw; thanks for the code suggestion, @jcmbowman)
19+
# - Miscellaneous formatting and clean-up
1720
#
1821
####################################################################################################
1922

@@ -29,17 +32,17 @@
2932
# Script Version and Jamf Pro Script Parameters
3033
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
3134

32-
scriptVersion="1.15.0-b5"
35+
scriptVersion="1.15.0-b6"
3336
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
3437
scriptLog="${4:-"/var/log/org.churchofjesuschrist.log"}" # Parameter 4: Script Log Location [ /var/log/org.churchofjesuschrist.log ] (i.e., Your organization's default location for client-side logs)
3538
debugMode="${5:-"verbose"}" # Parameter 5: Debug Mode [ verbose (default) | true | false ]
3639
welcomeDialog="${6:-"userInput"}" # Parameter 6: Welcome dialog [ userInput (default) | video | messageOnly | false ]
3740
completionActionOption="${7:-"Restart Attended"}" # Parameter 7: Completion Action [ wait | sleep (with seconds) | Shut Down | Shut Down Attended | Shut Down Confirm | Restart | Restart Attended (default) | Restart Confirm | Log Out | Log Out Attended | Log Out Confirm ]
38-
requiredMinimumBuild="${8:-"disabled"}" # Parameter 8: Required Minimum Build [ disabled (default) | 22E ] (i.e., Your organization's required minimum build of macOS to allow users to proceed; use "22E" for macOS 13.3)
41+
requiredMinimumBuild="${8:-"disabled"}" # Parameter 8: Required Minimum Build [ disabled (default) | 23F ] (i.e., Your organization's required minimum build of macOS to allow users to proceed; use "23F" for macOS 14.5)
3942
outdatedOsAction="${9:-"/System/Library/CoreServices/Software Update.app"}" # Parameter 9: Outdated OS Action [ /System/Library/CoreServices/Software Update.app (default) | jamfselfservice://content?entity=policy&id=117&action=view ] (i.e., Jamf Pro Self Service policy ID for operating system ugprades)
4043
webhookURL="${10:-""}" # Parameter 10: Microsoft Teams or Slack Webhook URL [ Leave blank to disable (default) | https://microsoftTeams.webhook.com/URL | https://hooks.slack.com/services/URL ] Can be used to send a success or failure message to Microsoft Teams or Slack via Webhook. (Function will automatically detect if Webhook URL is for Slack or Teams; can be modified to include other communication tools that support functionality.)
4144
presetConfiguration="${11:-""}" # Parameter 11: Specify a Configuration (i.e., `policyJSON`; NOTE: If set, `promptForConfiguration` will be automatically suppressed and the preselected configuration will be used instead)
42-
swiftDialogMinimumRequiredVersion="2.4.2.4755" # This will be set and updated as dependancies on newer features change.
45+
swiftDialogMinimumRequiredVersion="2.5.0.4760" # This will be set and updated as dependancies on newer features change.
4346

4447

4548

@@ -156,6 +159,8 @@ configurationThreeDescription="Recommended apps, Adobe Acrobat Reader and Google
156159
configurationThreeSize="106" # Configuration Three in Gibibits (i.e., Total File Size in Gigabytes * 7.451)
157160
configurationThreeInstallBuffer="0" # Buffer time added to estimates to include installation time of packages, in seconds. Set to 0 to disable.
158161

162+
163+
159164
####################################################################################################
160165
#
161166
# Functions
@@ -262,7 +267,6 @@ function calculateFreeDiskSpace() {
262267
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
263268

264269
function dialogUpdateWelcome(){
265-
# welcomeDialog "$1"
266270
echo "$1" >> "$welcomeCommandFile"
267271
}
268272

@@ -333,7 +337,7 @@ function finalise(){
333337
wait
334338

335339
dialogUpdateSetupYourMac "quit:"
336-
eval "${dialogFailureCMD}" & sleep 0.3
340+
eval "${dialogFailureCMD}" & sleep 0.7
337341

338342
updateFailureDialog "\n\n# # #\n# FAILURE DIALOG\n# # #\n"
339343
updateFailureDialog "Jamf Pro Policy Name Failures:"
@@ -424,11 +428,9 @@ function finalise(){
424428
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
425429

426430
function get_json_value() {
427-
# set -x
428431
JSON="$1" osascript -l 'JavaScript' \
429432
-e 'const env = $.NSProcessInfo.processInfo.environment.objectForKey("JSON").js' \
430433
-e "JSON.parse(env).$2"
431-
# set +x
432434
}
433435

434436

@@ -438,12 +440,10 @@ function get_json_value() {
438440
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
439441

440442
function get_json_value_welcomeDialog() {
441-
# set -x
442443
for var in "${@:2}"; do jsonkey="${jsonkey}['${var}']"; done
443444
JSON="$1" osascript -l 'JavaScript' \
444445
-e 'const env = $.NSProcessInfo.processInfo.environment.objectForKey("JSON").js' \
445446
-e "JSON.parse(env)$jsonkey"
446-
# set +x
447447
}
448448

449449

@@ -1747,11 +1747,22 @@ esac
17471747

17481748

17491749
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
1750-
# Set JAMF binary, Dialog path and Command Files
1750+
# Dialog binary (and enable swiftDialog's `--verbose` mode with SYM's debugMode)
17511751
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
17521752

1753-
jamfBinary="/usr/local/bin/jamf"
17541753
dialogBinary="/usr/local/bin/dialog"
1754+
case ${debugMode} in
1755+
"true" ) dialogBinary="${dialogBinary}" ;;
1756+
"verbose" ) dialogBinary="${dialogBinary} --verbose" ;;
1757+
esac
1758+
1759+
1760+
1761+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
1762+
# Set JAMF binary, Dialog Command Files
1763+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
1764+
1765+
jamfBinary="/usr/local/bin/jamf"
17551766
welcomeJSONFile=$( mktemp -u /var/tmp/welcomeJSONFile.XXX )
17561767
welcomeCommandFile=$( mktemp -u /var/tmp/dialogCommandFileWelcome.XXX )
17571768
setupYourMacCommandFile=$( mktemp -u /var/tmp/dialogCommandFileSetupYourMac.XXX )

0 commit comments

Comments
 (0)