Font installation has benn modified to create the right dorectories

master
Kerem Yollu 3 years ago
parent 284f82e94e
commit 1d238895a9

@ -1,22 +0,0 @@
#!/bin/bash
install_fonts()
{
cd $MAIN_DIR/programs/fonts/
sudo mkdir /usr/local/share/fonts
git clone https://github.com/adobe-fonts/source-code-pro
sudo cp -r source-code-pro /usr/local/share/fonts/
sudo chmod -R 555 /usr/local/share/fonts/source-code-pro
sudo rm -r source-code-pro
wget https://use.fontawesome.com/releases/v6.2.1/fontawesome-free-6.2.1-desktop.zip
unzip *.zip
rm *.zip
dir=$(find . -mindepth 1 -maxdepth 1 -type d)
sudo cp -r $dir /usr/local/share/fonts/fontawesome
sudo chmod -R 555 /usr/local/share/fonts/fontawesome
rm -r $dir
fc-cache -v
cd $MAIN_DIR
}

@ -2,6 +2,8 @@
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"
@ -10,6 +12,17 @@ fonts_intro()
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()
@ -25,20 +38,42 @@ fonts_install_all()
{
cd $MAIN_DIR/programs/fonts/
fonts_intro
sudo mkdir /usr/local/share/fonts
git clone $sourceCodePro
sudo cp -r source-code-pro /usr/local/share/fonts/
sudo chmod -R 555 /usr/local/share/fonts/source-code-pro
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)
sudo cp -r $dir /usr/local/share/fonts/fontawesome
sudo chmod -R 555 /usr/local/share/fonts/fontawesome
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
}

Loading…
Cancel
Save