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 twitter.com/richhickson
# www.RichardHickson.com

#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/Montserrat.zip "https://fonts.google.com/download?family=Montserrat";

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

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

Leave a Comment