From 5e47bb2113926869655bb857a07b07b3cac19cfd Mon Sep 17 00:00:00 2001 From: Carl Lange Date: Fri, 4 Sep 2015 17:59:43 +0100 Subject: [PATCH 1/2] only try fc-cache reset on linux fc-cache doesn't exist on osx :) --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index a18a7fc..8438f1c 100755 --- a/install.sh +++ b/install.sh @@ -18,8 +18,10 @@ fi eval $find_command | xargs -0 -I % cp "%" "$font_dir/" # Reset font cache on Linux -if [[ -n `which fc-cache` ]]; then - fc-cache -f $font_dir +if [[ `uname` != 'Darwin' ]]; then + if [[ -n `which fc-cache` ]]; then + fc-cache -f $font_dir + fi fi echo "All Powerline fonts installed to $font_dir" From ff1bbd224f6aa04b90955b8001156073c3f5ef81 Mon Sep 17 00:00:00 2001 From: Carl Lange Date: Wed, 18 Nov 2015 10:15:06 +0000 Subject: [PATCH 2/2] fixed the fc-cache check --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 8438f1c..25280df 100755 --- a/install.sh +++ b/install.sh @@ -15,13 +15,13 @@ else fi # Copy all fonts to user fonts directory +echo "Copying fonts..." eval $find_command | xargs -0 -I % cp "%" "$font_dir/" # Reset font cache on Linux -if [[ `uname` != 'Darwin' ]]; then - if [[ -n `which fc-cache` ]]; then +if command -v fc-cache @>/dev/null ; then + echo "Resetting font cache, this may take a moment..." fc-cache -f $font_dir - fi fi echo "All Powerline fonts installed to $font_dir"