Skip to content
Myr

Update install script

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 30f9651 · Browse files · 1 file+7 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−3 removed

  • other:+7 added−3 removed

1 file+7 added−3 removed

modified:install+7 added-3 removed
14 unmodified lines
15 echo -n " - Checking fzf executable ... "16 local output=$("$fzf_base"/bin/fzf --version 2>&1)17 if [ "$version" = "$output" ]; then18 echo "$output"19 binary_error=""20 else21 echo "$output != $version"22 rm -f "$fzf_base"/bin/fzf23 binary_error="Invalid binary"
3 unmodified lines
2728symlink() {29 echo " - Creating symlink: bin/$1 -> bin/fzf"30 (cd "$fzf_base"/bin &&30 rm -f fzf31 rm -f fzf &&32 ln -sf $1 fzf)33 if [ $? -ne 0 ]; then34 binary_error="Failed to create symlink"35 return 136 fi37}3839download() {40 echo "Downloading bin/fzf ..."41 if [[ ! $1 =~ dev && -x "$fzf_base"/bin/fzf ]]; then42 echo " - Already exists"43 check_binary && return44 elif [ -x "$fzf_base"/bin/$1 ]; then40 symlink $141 check_binary && return45 symlink $1 && check_binary && return46 fi47 mkdir -p "$fzf_base"/bin && cd "$fzf_base"/bin48 if [ $? -ne 0 ]; then49 binary_error="Failed to create bin directory"
448 unmodified lines