You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.5 KiB

#!/bin/bash
FONTS_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
sourceCodePro="https://github.com/adobe-fonts/source-code-pro"
awsomeFont="https://use.fontawesome.com/releases/v6.2.1/fontawesome-free-6.2.1-desktop.zip"
fonts_intro()
{
graphics_install_prompt "Following Fonts Will be installed"
graphics_install_prompt "$sourceCodePro"
graphics_install_prompt "$awsomeFont"
if [[ -d "$FONTS_DIR" ]]
then
graphics_comment "$FONTS_DIR Exists"
else
graphics_comment "$FONTS_DIR Will be created"
sudo mkdir $FONTS_DIR
fi
}
fonts_outro()
{
graphics_install_prompt "fonts installation complete"
cd $MAIN_DIR
}
install_fonts()
{
fonts_intro
cd $FONTS_SCRIPT_DIR
git clone $sourceCodePro
if [[ -d "$FONTS_DIR/source-code-pro" ]]
then
graphics_comment "A version of source-code-pro exits and will be repacled"
sudo rm -r $FONTS_DIR/source-code-pro
else
graphics_comment "Creating $FONTS_DIR/source-code-pro directory"
fi
sudo cp -r source-code-pro $FONTS_DIR
sudo chmod -R 555 $FONTS_DIR/source-code-pro
sudo rm -r source-code-pro
wget $awsomeFont
unzip *.zip
rm *.zip
dir=$(find . -mindepth 1 -maxdepth 1 -type d)
if [[ -d "$FONTS_DIR/fontawesome" ]]
then
graphics_comment "A version of awsomeFont exits and will be repacled"
sudo rm -r $FONTS_DIR/fontawesome
else
graphics_comment "Creating $FONTS_DIR/fontawesome directory"
fi
sudo cp -r $dir $FONTS_DIR/fontawesome
sudo chmod -R 555 $FONTS_DIR/fontawesome
rm -r $dir
fc-cache -v
fonts_outro
}