|
|
|
@ -3,20 +3,22 @@
|
|
|
|
|
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"
|
|
|
|
|
awsomeFont6="https://use.fontawesome.com/releases/v6.2.1/fontawesome-free-6.2.1-desktop.zip"
|
|
|
|
|
awsomeFont5="https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-desktop.zip"
|
|
|
|
|
|
|
|
|
|
fonts_intro()
|
|
|
|
|
{
|
|
|
|
|
graphics_install_prompt "Following Fonts Will be installed"
|
|
|
|
|
graphics_install_prompt "$sourceCodePro"
|
|
|
|
|
graphics_install_prompt "$awsomeFont"
|
|
|
|
|
graphics_install_prompt "$awsomeFont6"
|
|
|
|
|
graphics_install_prompt "$awsomeFont5"
|
|
|
|
|
|
|
|
|
|
if [[ -d "$FONTS_DIR" ]]
|
|
|
|
|
then
|
|
|
|
|
graphics_comment "$FONTS_DIR Exists"
|
|
|
|
|
else
|
|
|
|
|
graphics_comment "$FONTS_DIR Will be created"
|
|
|
|
|
sudo mkdir $FONTS_DIR
|
|
|
|
|
sudo mkdir -p $FONTS_DIR
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -32,6 +34,7 @@ install_fonts()
|
|
|
|
|
|
|
|
|
|
cd $FONTS_SCRIPT_DIR
|
|
|
|
|
|
|
|
|
|
graphics_install_prompt "Installing Source Code Pro"
|
|
|
|
|
git clone $sourceCodePro
|
|
|
|
|
|
|
|
|
|
if [[ -d "$FONTS_DIR/source-code-pro" ]]
|
|
|
|
@ -46,23 +49,47 @@ install_fonts()
|
|
|
|
|
sudo chmod -R 555 $FONTS_DIR/source-code-pro
|
|
|
|
|
sudo rm -r source-code-pro
|
|
|
|
|
|
|
|
|
|
wget $awsomeFont
|
|
|
|
|
unzip *.zip
|
|
|
|
|
|
|
|
|
|
graphics_install_prompt "Installing Awsome Fonts Version 6"
|
|
|
|
|
wget $awsomeFont6
|
|
|
|
|
unzip -q *.zip
|
|
|
|
|
rm *.zip
|
|
|
|
|
|
|
|
|
|
fontDir=$(find . -mindepth 1 -maxdepth 1 -type d)
|
|
|
|
|
|
|
|
|
|
if [[ -d "$FONTS_DIR/$fontDir" ]]
|
|
|
|
|
then
|
|
|
|
|
graphics_comment "A version of $fontDir exits and will be repacled"
|
|
|
|
|
sudo rm -r $FONTS_DIR/$fontDir
|
|
|
|
|
else
|
|
|
|
|
graphics_comment "Creating $FONTS_DIR/$fontDir directory"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
sudo cp -r $fontDir $FONTS_DIR/
|
|
|
|
|
sudo chmod -R 555 $FONTS_DIR/
|
|
|
|
|
rm -r $fontDir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
graphics_install_prompt "Installing Awsome Fonts Version 5"
|
|
|
|
|
wget $awsomeFont5
|
|
|
|
|
unzip -q *.zip
|
|
|
|
|
rm *.zip
|
|
|
|
|
|
|
|
|
|
dir=$(find . -mindepth 1 -maxdepth 1 -type d)
|
|
|
|
|
fontDir=$(find . -mindepth 1 -maxdepth 1 -type d)
|
|
|
|
|
|
|
|
|
|
if [[ -d "$FONTS_DIR/fontawesome" ]]
|
|
|
|
|
if [[ -d "$FONTS_DIR/$fontDir" ]]
|
|
|
|
|
then
|
|
|
|
|
graphics_comment "A version of awsomeFont exits and will be repacled"
|
|
|
|
|
sudo rm -r $FONTS_DIR/fontawesome
|
|
|
|
|
graphics_comment "A version of $fontDir exits and will be repacled"
|
|
|
|
|
sudo rm -r $FONTS_DIR/$fontDir
|
|
|
|
|
else
|
|
|
|
|
graphics_comment "Creating $FONTS_DIR/fontawesome directory"
|
|
|
|
|
graphics_comment "Creating $FONTS_DIR/$fontDir directory"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
sudo cp -r $dir $FONTS_DIR/fontawesome
|
|
|
|
|
sudo chmod -R 555 $FONTS_DIR/fontawesome
|
|
|
|
|
rm -r $dir
|
|
|
|
|
fc-cache -v
|
|
|
|
|
sudo cp -r $fontDir $FONTS_DIR/
|
|
|
|
|
sudo chmod -R 555 $FONTS_DIR/
|
|
|
|
|
rm -r $fontDir
|
|
|
|
|
|
|
|
|
|
fc-cache -f -v
|
|
|
|
|
fonts_outro
|
|
|
|
|
}
|
|
|
|
|