#!/bin/bash
##########################################################
#                                                        #
#   This installer installs all fonts                    #
#                                                        #
#   DO NOT EDIT !!!                                      #
#                                                        #
##########################################################

fontdir="$HOME/.local/share/fonts/conky-musicplayer"

scrpath=$(readlink -f $0)
workdir=$(dirname $scrpath)
cd "$workdir/fonts"

if ! [ -d "$fontdir" ]; then
  mkdir -p "$fontdir"
fi
echo
while read -r font
do
    cp -f "./$font" "$fontdir"
    chmod 644 "$fontdir/$font"
    echo -e " - $font installed"

done< <(ls *.ttf) | awk '{ printf "%-3s %-25s \033[1;32m%-10s\033[m\n", $1, $2, $3}'
fc-cache -f
echo -e "\nFont cache updated!\n"

