Skip to content

Instantly share code, notes, and snippets.

@anein
Created April 14, 2019 12:17
Show Gist options
  • Save anein/7763b935fe9a7a0388708c7592095d4d to your computer and use it in GitHub Desktop.
Save anein/7763b935fe9a7a0388708c7592095d4d to your computer and use it in GitHub Desktop.
Fonts installation for Clear Linux. Lighter version.
#!/bin/sh
DEST=~/.local/share/fonts
TEMP_DIR=/tmp/fonts_install
font_files="andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe georgi32.exe impact32.exe times32.exe trebuc32.exe webdin32.exe verdan32.exe wd97vwr32.exe"
download(){
wget -P ${TEMP_DIR} "https://netcologne.dl.sourceforge.net/project/corefonts/the%20fonts/final/$1"
}
extract(){
cabextract -L --filter "*.ttf" $1
}
move(){
mv *.ttf ${DEST}
}
# pre-installation
rm -rf ${TEMP_DIR}
mkdir -p ${TEMP_DIR}
cd ${TEMP_DIR}
# Installation
for f in ${font_files}
do
echo "Download $f"
download $f
echo "Extract $f"
extract $f
echo "Move fonts"
move
done
# Update cache
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache -f -v
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment