Skip to content

Commit

Permalink
Addded a font selection option
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Nygard committed Oct 11, 2015
1 parent 4151af0 commit 3350f67
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
# 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 an argument is given it is used to select wich fonts to install
prefix=''
if [ $# = 1 ]; then
prefix=$1
fi

find_command="find \"$powerline_fonts_dir\" \( -name '$prefix*.[o,t]tf' -or -name '$prefix*.pcf.gz' \) -type f -print0"

if [[ `uname` == 'Darwin' ]]; then
# MacOS
Expand All @@ -22,4 +28,4 @@ if [[ -n `which fc-cache` ]]; then
fc-cache -f $font_dir
fi

echo "All Powerline fonts installed to $font_dir"
echo "Powerline fonts installed to $font_dir"

0 comments on commit 3350f67

Please sign in to comment.