Skip to content

Instantly share code, notes, and snippets.

@davinash97
Created May 4, 2024 13:51
Show Gist options
  • Select an option

  • Save davinash97/7b7109c7de65db3b11292a02a55958f3 to your computer and use it in GitHub Desktop.

Select an option

Save davinash97/7b7109c7de65db3b11292a02a55958f3 to your computer and use it in GitHub Desktop.
To install Microsoft Fonts like Times New Roman, Ariel etc.
#!/bin/sh
# Creating Folder for temp downloads
CURR="$PWD"
MAIN="${HOME}/Downloads/msFonts"
if [ ! -d "$MAIN" ]; then
mkdir -p "$MAIN" && cd "$_" || exit 1
else
cd "$MAIN" || exit 1
fi
LINKS=("http://mirrors.coreix.net/li.nux.ro//nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm" "http://mirrors.coreix.net/li.nux.ro//nux/dextop/el7/x86_64/webcore-fonts-vista-3.0-1.noarch.rpm")
# Downloading & Installing necessary files
for DOWNLOAD_LINK in "${LINKS[@]}"; do
if [ -f "$(basename "$DOWNLOAD_LINK")" ]; then
echo "$(basename "$DOWNLOAD_LINK") exists, so skipping";
else
echo "Downloading $DOWNLOAD_LINK";
curl -sO "$DOWNLOAD_LINK";
fi
sudo dnf install -y $DOWNLOAD_LINK;
done
# Changing directory to home
cd "$CURR" || exit 1
# Deleting temp files and folder
rm -rf "$HOME/Downloads/msFonts"
@davinash97
Copy link
Copy Markdown
Author

This is specifically for red hat based distros, or fedroa (in this case)
you can Download the script manually
or
Just do curl -sSL https://gist.githubusercontent.com/davinash97/7b7109c7de65db3b11292a02a55958f3/raw/faf322ea9deeb28440e6e718ffbcf0dcdb5f9c78/installMsfonts.sh | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment