#!/bin/bash # A simple srcipt that moves collected fonts to local font directory # get current path DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" FONT_DIR="$DIR/collections" echo "Found fonts:" find "$FONT_DIR" -mindepth 1 -type d -exec basename {} \; echo "------" # get target path if [[ $(uname) == 'Linux' ]]; then TARGET_DIR="$HOME/.local/share/fonts" else echo "This script only works on Linux." fi echo "Installing fonts to $TARGET_DIR" cp -r $FONT_DIR/* $TARGET_DIR echo "Refreshing font cache" fc-cache -f echo "Done"