From 68c5bea3f82cb0b9c29a298a1588838749054f4e Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 12 Mar 2015 10:06:15 +0900 Subject: [PATCH] Fix install script for platforms w/o matching Go binary (#141) --- install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install b/install index 8b53f72..f1fae0b 100755 --- a/install +++ b/install @@ -77,7 +77,7 @@ case "$archi" in Darwin\ i*86) download fzf-$version-darwin_386 ;; Linux\ x86_64) download fzf-$version-linux_amd64 ;; Linux\ i*86) download fzf-$version-linux_386 ;; - *) binary_available=0 ;; + *) binary_available=0 binary_error=1 ;; esac cd "$fzf_base" @@ -173,6 +173,9 @@ fzf() { $fzf_cmd "\$@" } export -f fzf > /dev/null +if [[ ! "\$PATH" =~ "$fzf_base/bin" ]]; then + export PATH="$fzf_base/bin:\$PATH" +fi # Auto-completion # ---------------