How to Install Slack for macOS using JumpCloud Commands

** December 2020 Update ** – This script has been updated, so when it mounts the DMG it now doesnt pop up wiht the folder. So it is completly silent in the background

The next script talks you through how to install Slack for macOS using JumpCloud Commands. It follows a similar structure to the other commands I have posted. Creates a temp repo on the mac, Kills the old version, removes the old version, downloads the latest version, mounts, installs, and removes the temp files. Simple but effective. I have broken this out of this post as I am separating all of the commands into there own blog post.

Install Slack for macOS using JumpCloud Commands.

# Script to download, Silent Install and then clean up once installed Slack
# Writen by

#Kill Old Version
killall Slack

#Remove Old Version of Slack
sudo rm -rf /Applications/

#Make temp folder for downloads.
mkdir "/tmp/slack/";
cd "/tmp/slack/";

#Download Slack.
curl -L -o /tmp/slack/slack.dmg "";

#Mount DMG
hdiutil attach /tmp/slack/slack.dmg -nobrowse;

#Copy App to Applications
sudo cp -R "/Volumes/" /Applications;

#Open Slack
open /Applications/

#Unmount DMG
hdiutil detach /Volumes/ -force;

#tidy up
sudo rm -rf "/tmp/slack";

Other JumpCloud posts you might like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.