Skip to main content

Hi all,



Wanted to share a small script I've been using to install/update the OS X Slack app using the JSS. Found App Store app deployment considerations to be an unnecessary pain for the deployment but could not deploy a flat package with an Apple ID locked Slack app because users would not be able to update. Inspired by the recent App Store downtime



I am far from a pro developer. Happy to get any input.



https://github.com/opragel/install_latest_slack_osx_app

Thanks @JarvisUno I will test it out soon.


Anybody has a script to install and download the latest version of Slack?


Any script for M1 chip laptop


This script works for me. It is based on the Google Chrome DL and Install script found here: https://www.jamf.com/jamf-nation/discussions/20894/install-latest-version-of-google-chrome-without-re-packaging#responseChild196658



#!/bin/sh
dmgfile="Slack.dmg"
volname="Slack.app"
logfile="/Library/Logs/SlackInstallScript.log"

url='https://slack.com/ssb/download-osx'

/bin/echo "--" >> ${logfile}
/bin/echo "`date`: Downloading latest version." >> ${logfile}
/usr/bin/curl -L -o /tmp/${dmgfile} "${url}" >/dev/null 2>&1
/bin/echo "`date`: Mounting installer disk image." >> ${logfile}
/usr/bin/hdiutil attach /tmp/${dmgfile} -nobrowse -quiet
/bin/echo "`date`: Installing..." >> ${logfile}
ditto -rsrc "/Volumes/${volname}/Slack.app" "/Applications/Slack.app"
/bin/sleep 10
/bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep "${volname}" | awk '{print $1}') -quiet
/bin/sleep 10
/bin/echo "`date`: Deleting disk image." >> ${logfile}
/bin/rm /tmp/"${dmgfile}"

exit 0

Hey All,



Thought I would post this to help others. I found the links for the 3 different installers:



Intel = curl "https://slack.com/ssb/download-osx" -s -L -I -o /dev/null -w '%{url_effective}'
Silicon = curl "https://slack.com/ssb/download-osx-silicon" -s -L -I -o /dev/null -w '%{url_effective}'
Universal = curl "https://slack.com/ssb/download-osx-universal" -s -L -I -o /dev/null -w '%{url_effective}'



Article pulled from: https://slack.com/help/articles/360035635174-Deploy-Slack-for-macOS



Hope this helps



Shawn OG


Reply