From 4f4f27c76b175a5f83521a2b55f4044967939228 Mon Sep 17 00:00:00 2001 From: Tony Thayer Date: Mon, 3 Nov 2014 13:25:45 -0800 Subject: [PATCH 1/2] Update install.sh This script was only copying over the pcf.gz files on OSX 10.9 and 10.10 since the find command is a little different. --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 97270ae..f15db0c 100755 --- a/install.sh +++ b/install.sh @@ -6,14 +6,15 @@ powerline_fonts_dir=$( cd "$( dirname "$0" )" && pwd ) if [[ `uname` == 'Darwin' ]]; then # MacOS font_dir="$HOME/Library/Fonts" + find_command="find $powerline_fonts_dir \( -name '*.[o,t]tf' -or -name '*.pcf.gz' \) -type f -print0" else # Linux font_dir="$HOME/.fonts" + find_command="find $powerline_fonts_dir -name '*.[o,t]tf' -o -name '*.pcf.gz' -type f -print0" mkdir -p $font_dir fi # Copy all fonts to user fonts directory -find_command="find $powerline_fonts_dir -name '*.[o,t]tf' -o -name '*.pcf.gz' -type f -print0" eval $find_command | xargs -0 -I % cp % $font_dir/ # Reset font cache on Linux From 109a62b705212255f18bfb7840e0b8e4f6e54627 Mon Sep 17 00:00:00 2001 From: Tony Thayer Date: Tue, 4 Nov 2014 08:54:18 -0800 Subject: [PATCH 2/2] Update install.sh Further testing shows that the find command fails for GNU find under Ubuntu 11.10 and EL6. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f15db0c..e5ecbc0 100755 --- a/install.sh +++ b/install.sh @@ -3,14 +3,14 @@ # Set source and target directories powerline_fonts_dir=$( cd "$( dirname "$0" )" && pwd ) +find_command="find $powerline_fonts_dir \( -name '*.[o,t]tf' -or -name '*.pcf.gz' \) -type f -print0" + if [[ `uname` == 'Darwin' ]]; then # MacOS font_dir="$HOME/Library/Fonts" - find_command="find $powerline_fonts_dir \( -name '*.[o,t]tf' -or -name '*.pcf.gz' \) -type f -print0" else # Linux font_dir="$HOME/.fonts" - find_command="find $powerline_fonts_dir -name '*.[o,t]tf' -o -name '*.pcf.gz' -type f -print0" mkdir -p $font_dir fi