1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-11-25 16:47:37 +02:00

Make the install script callable from everywhere

Installation would fail if you did not first cd in into the nerd-fonts
directory before running install.sh as $nerdfonts_root_dir referenced
${PWD} which is the path your shell is into when calling the script,
not the basepath of the script, parent of "patched-fonts".
This commit is contained in:
Antoine Rahier 2017-08-31 23:33:45 +02:00
parent c89aeaa7d0
commit 2b73bffaee

View File

@ -136,7 +136,7 @@ done
shift $(($OPTIND-1))
# Set source and target directories, default: all fonts
nerdfonts_root_dir="${PWD}/patched-fonts"
nerdfonts_root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/patched-fonts"
nerdfonts_dirs=("$nerdfonts_root_dir")
# Accept font / directory names, to avoid installing all fonts