Skip to content

Instantly share code, notes, and snippets.

@unnikked
Created June 2, 2014 13:04
Show Gist options
  • Select an option

  • Save unnikked/0aa8437f75e01a5a4579 to your computer and use it in GitHub Desktop.

Select an option

Save unnikked/0aa8437f75e01a5a4579 to your computer and use it in GitHub Desktop.
A simple bash script to install fonts on your Ubuntu like distro
#!/bin/bash
if [ $# -ne 1 ]; then
echo "USAGE: $0 [font-file]"
exit 1
fi
if [ "$(whoami)" != "root" ]; then
echo "You do not have enough privileges to use this script"
exit 1
fi
echo "Copying $1 to system font location.."
cp -i "$1" /usr/share/fonts/truetype/
echo "Reloading fonts.."
fc-cache -f
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment