Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
002240677f | |||
012d63d969 | |||
|
973abf5c8c | ||
680b053267 |
11
GFontInstaller.sh
Normal file → Executable file
11
GFontInstaller.sh
Normal file → Executable file
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SCRIPTLOC=$FIXME
|
SCRIPTLOC="https://gitlab.tfmm.co/tfmm/GFontInstallerMac/-/raw/master/fontupdater.sh"
|
||||||
|
|
||||||
#Check for root
|
#Check for root
|
||||||
if [[ $EUID -ne "0" ]]
|
if [[ $EUID -ne "0" ]]
|
||||||
@ -20,12 +20,15 @@ do
|
|||||||
case $opt in
|
case $opt in
|
||||||
"Daily (Not Recommended)")
|
"Daily (Not Recommended)")
|
||||||
updatefreq=daily
|
updatefreq=daily
|
||||||
|
break
|
||||||
;;
|
;;
|
||||||
"Weekly")
|
"Weekly")
|
||||||
updatefreq=weekly
|
updatefreq=weekly
|
||||||
|
break
|
||||||
;;
|
;;
|
||||||
"Monthly")
|
"Monthly")
|
||||||
updatefreq=monthly
|
updatefreq=monthly
|
||||||
|
break
|
||||||
;;
|
;;
|
||||||
"Quit")
|
"Quit")
|
||||||
break
|
break
|
||||||
@ -37,7 +40,7 @@ done
|
|||||||
#Setup directory in /opt and fetch script
|
#Setup directory in /opt and fetch script
|
||||||
mkdir -p /opt/gfontinstallermac
|
mkdir -p /opt/gfontinstallermac
|
||||||
|
|
||||||
wget -o $SCRIPTLOC /opt/gfontinstallermac/fontupdater.sh
|
wget -O /opt/gfontinstallermac/fontupdater.sh $SCRIPTLOC
|
||||||
|
|
||||||
chmod +x /opt/gfontinstallermac/fontupdater.sh
|
chmod +x /opt/gfontinstallermac/fontupdater.sh
|
||||||
|
|
||||||
@ -54,7 +57,7 @@ popd
|
|||||||
|
|
||||||
#Setup auto-update
|
#Setup auto-update
|
||||||
mkdir -p /usr/local/etc/periodic/$updatefreq
|
mkdir -p /usr/local/etc/periodic/$updatefreq
|
||||||
ln -sf /usr/local/etc/periodic/$updatefreq/fontupdater /opt/gfontinstallermac/fontupdater.sh
|
ln -sf /opt/gfontinstallermac/fontupdater.sh /usr/local/etc/periodic/$updatefreq/fontupdater
|
||||||
|
|
||||||
#Finished
|
#Finished
|
||||||
echo "Google Fonts installed in /Users/$username/Library/Fonts and set to update $updatefreq."
|
echo "Google Fonts installed in /Users/$username/Library/Fonts and set to update $updatefreq."
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
Google Font installer and updater for Mac. Tested on Big Sur. Requires git and wget to be installed.
|
Google Font installer and updater for Mac. Tested on Big Sur. Requires git and wget to be installed.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
* Download the latest `GFontInstaller.sh` script from the [releases page](https://gogs.tfmm.co/tfmm/GFontInstallerMac/releases)
|
* Download the latest `GFontInstaller.sh` script.
|
||||||
* Run script as root: `sudo GFontInstaller.sh`
|
* Run script as root: `sudo GFontInstaller.sh`
|
||||||
* Follow Prompts
|
* Follow Prompts
|
||||||
|
|
||||||
## Information
|
## Information
|
||||||
You will be prompted for a frequency at which to update the fonts from the Google Git repository, I would recommend weekly at the most frequent, as daily just seems like a lot.
|
You will be prompted for a frequency at which to update the fonts from the Google Git repository, I would recommend weekly at the most frequent, as daily just seems like a lot.
|
||||||
|
|
||||||
You will be prompted for which user to install the fonts, at this point in time they can only be installed for one user per machine.
|
You will be prompted for which user to install the fonts, at this point in time they can only be installed for one user per machine.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#Source config file
|
#Source config file
|
||||||
. ${PWD}/config
|
. /opt/gfontinstallermac/config
|
||||||
|
|
||||||
#Move to font directory
|
#Move to font directory
|
||||||
cd /Users/$USER/Library/Fonts/google-fonts
|
cd /Users/$USER/Library/Fonts/google-fonts
|
||||||
sudo -u $USER git pull
|
sudo -u $USER git pull
|
||||||
|
Loading…
x
Reference in New Issue
Block a user