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.
80 lines
1.7 KiB
80 lines
1.7 KiB
#!/bin/bash
|
|
|
|
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"
|
|
fontsInstallDir="/usr/local/share/fonts"
|
|
|
|
fonts_intro()
|
|
{
|
|
color_start "themeInstall"
|
|
echo ""
|
|
echo "Following Fonts Will be installed"
|
|
echo $sourceCodePro
|
|
echo $awsomeFont
|
|
color_stop
|
|
|
|
color_start "themeIndication"
|
|
if [[ -d "$fontsInstallDir" ]]
|
|
then
|
|
echo "$fontsInstallDir Exists"
|
|
else
|
|
echo "$fontsInstallDir Will be created"
|
|
sudo mkdir $fontsInstallDir
|
|
fi
|
|
color_stop
|
|
sleep $sleepTime
|
|
}
|
|
|
|
fonts_outro()
|
|
{
|
|
color_start "themeInstall"
|
|
echo "fonts installation complete"
|
|
echo ""
|
|
color_stop
|
|
cd $MAIN_DIR
|
|
}
|
|
|
|
fonts_install_all()
|
|
{
|
|
cd $MAIN_DIR/programs/fonts/
|
|
fonts_intro
|
|
git clone $sourceCodePro
|
|
|
|
color_start "themeIndication"
|
|
if [[ -d "$fontsInstallDir/source-code-pro" ]]
|
|
then
|
|
echo "A version of source-code-pro exits and will be repacled"
|
|
sudo rm -r $fontsInstallDir/source-code-pro
|
|
else
|
|
echo "Creating $fontsInstallDir/source-code-pro directory"
|
|
fi
|
|
color_stop
|
|
sleep $sleepTime
|
|
|
|
sudo cp -r source-code-pro $fontsInstallDir
|
|
sudo chmod -R 555 $fontsInstallDir/source-code-pro
|
|
sudo rm -r source-code-pro
|
|
|
|
wget $awsomeFont
|
|
unzip *.zip
|
|
rm *.zip
|
|
dir=$(find . -mindepth 1 -maxdepth 1 -type d)
|
|
|
|
color_start "themeIndication"
|
|
if [[ -d "$fontsInstallDir/fontawesome" ]]
|
|
then
|
|
echo "A version of awsomeFont exits and will be repacled"
|
|
sudo rm -r $fontsInstallDir/fontawesome
|
|
else
|
|
echo "Creating $fontsInstallDir/fontawesome directory"
|
|
fi
|
|
color_stop
|
|
sleep $sleepTime
|
|
|
|
sudo cp -r $dir $fontsInstallDir/fontawesome
|
|
sudo chmod -R 555 $fontsInstallDir/fontawesome
|
|
rm -r $dir
|
|
fc-cache -v
|
|
fonts_outro
|
|
}
|