d
Amit DhamuSoftware Engineer
 

Install Fonts with wget on macOS

1 minute read 00000 views

As I'm always looking at ways to automate and backup my settings and configurations across the many different apps and service I use, one of the more recent additions to this has been downloading and installing fonts.

To do this is very simple with a combination of wget and unzip.

Go into the User Installed fonts directory

cd ~/Library/Fonts

Download the zip archive of the font

wget https://github.com/JetBrains/JetBrainsMono/releases/download/v2.242/JetBrainsMono-2.242.zip -O JetBrainsMono.zip

Unzip the archive

unzip -jo JetBrainsMono.zip '*.ttf'
  • -j means extract the files in the archive into the directory we are in without the directory structure
  • -o means overwrite the files without prompting if they exist

Delete the archive

rm JetBrainsMono.zip

Go back to where we were

cd -

Full Snippet

cd ~/Library/Fonts
wget https://github.com/JetBrains/JetBrainsMono/releases/download/v2.242/JetBrainsMono-2.242.zip -O JetBrainsMono.zip
unzip -jo JetBrainsMono.zip '*.ttf'
rm JetBrainsMono.zip
cd -