microsoft / shell-intune-samples

Sample shell scripts for Intune admins.
MIT License
637 stars 213 forks source link

Nudge script is downloading a hardcoded version instead of the latest. #69

Closed rnicolson closed 1 year ago

rnicolson commented 1 year ago

Script is downloading the 1.1.7.81411 version. Changing the weburl to something like the following should ensure it always grabs the latest.

nudgeLatestURL="https://github.com/macadmins/nudge/releases/latest/" versionUrl=$(curl "${nudgeLatestURL}" -s -L -I -o /dev/null -w '%{url_effective}') versionNumber=$(printf "%s" "${versionUrl[@]}" | sed 's@.*/@@' | sed 's/%20/-/g') versionNumber=${versionNumber:1} weburl="https://github.com/macadmins/nudge/releases/download/v$versionNumber/Nudge_Suite-$versionNumber.pkg"

theneiljohnson commented 1 year ago

Thanks, finally got around to implementing this. https://github.com/microsoft/shell-intune-samples/tree/master/macOS/Apps/Nudge