Skip to main content

Worklet: Install Slack on MacOS


Hi all, here’s a Worklet to install Slack on MacOS

Evaluation:

#!/bin/bash

#Checks whether the Slack.app is installed in the /Applications directory, if not, Exit 1 code and goes to next step

if [[ -d "/Applications/Slack.app" ]]; then
        echo "Slack is installed."
        exit 0
else
        echo "Slack is not installed."
        exit 1
fi

Remediation:

#!/bin/bash

echo -e "Downloading Slack..."
curl -L -o "/tmp/Slack.dmg" https://slack.com/ssb/download-osx

echo -e "Installing Slack..."
hdiutil attach "/tmp/Slack.dmg" -nobrowse
ditto "/Volumes/Slack.app/Slack.app" "/Applications/Slack.app"

echo -e "Cleaning up..."
hdiutil detach "/Volumes/Slack.app"
rm -f "/tmp/Slack.dmg"

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings