mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2026-09-10 07:36:35 -04:00
fc-install: Fix: Allow Mac and XDG
wrong indentation Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
38868a0092
commit
523a8e1b44
18
fc_install
18
fc_install
|
|
@ -43,19 +43,19 @@ FONT_FORMATS=(ttf otf)
|
|||
|
||||
# Get target font directory
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
# MacOS
|
||||
sys_share_dir="/Library"
|
||||
usr_share_dir="$HOME/Library"
|
||||
font_subdir="Fonts"
|
||||
# MacOS
|
||||
sys_share_dir="/Library"
|
||||
usr_share_dir="$HOME/Library"
|
||||
font_subdir="Fonts"
|
||||
else
|
||||
# Linux
|
||||
sys_share_dir="/usr/local/share"
|
||||
usr_share_dir="$HOME/.local/share"
|
||||
font_subdir="fonts"
|
||||
# Linux
|
||||
sys_share_dir="/usr/local/share"
|
||||
usr_share_dir="$HOME/.local/share"
|
||||
font_subdir="fonts"
|
||||
fi
|
||||
XDG_DATA_HOME="${XDG_DATA_HOME:-}"
|
||||
if [ -n "${XDG_DATA_HOME}" ]; then
|
||||
usr_share_dir="${XDG_DATA_HOME}"
|
||||
usr_share_dir="${XDG_DATA_HOME}"
|
||||
fi
|
||||
if [ ${EUID:-0} -ne 0 ] || [ "$(id -u)" -ne 0 ]; then
|
||||
FONT_DIR="${FONT_DIR:-${usr_share_dir}/${font_subdir}/NerdFonts}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue