Installing Fonts using JumpCloud Commands on macOS

I have been working for many years to make onboarding new client machines much easier. One thing I always forget due to the number of different clients I work with is their particular corporate font. I have written the bellow working using Montserrat font and downloading from Google Fonts to remotely install it using JumpCloud Commands.

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

#Define Current User
currentuser=$(ls -l /dev/console | awk '{ print $3 }')

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

#Download filestream.
curl -L -o /tmp/Montserrat/ "";

#Unzip and Copy
cp Montserrat-*.ttf /Users/$currentuser/Library/Fonts/

#Tidy up
sudo rm -rf /tmp/Montserrat/

Leave a Comment