Skip to content

Instantly share code, notes, and snippets.

@diaraujo13
Created March 12, 2021 13:19
Show Gist options
  • Save diaraujo13/9a99497b1d48fa666fba2815a71cb3bf to your computer and use it in GitHub Desktop.
Save diaraujo13/9a99497b1d48fa666fba2815a71cb3bf to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
fonts_dir="${HOME}/.local/share/fonts"
if [ ! -d "${fonts_dir}" ]; then
echo "mkdir -p $fonts_dir"
mkdir -p "${fonts_dir}"
else
echo "Found fonts dir $fonts_dir"
fi
for type in Bold Light Medium Regular Retina; do
file_path="${HOME}/.local/share/fonts/FiraCode-${type}.ttf"
file_url="https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true"
if [ ! -e "${file_path}" ]; then
echo "wget -O $file_path $file_url"
wget -O "${file_path}" "${file_url}"
else
echo "Found existing file $file_path"
fi;
done
echo "fc-cache -f"
fc-cache -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment