mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Update install/build script from Homebrew
This commit is contained in:
15
install
15
install
@@ -13,9 +13,14 @@ ask() {
|
||||
|
||||
check_binary() {
|
||||
echo -n " - Checking fzf executable ... "
|
||||
if ! "$fzf_base"/bin/fzf --version; then
|
||||
local output=$("$fzf_base"/bin/fzf --version 2>&1)
|
||||
if [ "$version" = "$output" ]; then
|
||||
echo "$output"
|
||||
else
|
||||
echo "$output != $version"
|
||||
rm -f "$fzf_base"/bin/fzf
|
||||
binary_error="Error occurred"
|
||||
binary_error="Invalid binary"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -27,9 +32,11 @@ symlink() {
|
||||
}
|
||||
|
||||
download() {
|
||||
echo "Downloading bin/$1 ..."
|
||||
if [ -x "$fzf_base"/bin/$1 ]; then
|
||||
echo "Downloading bin/fzf ..."
|
||||
if [ -x "$fzf_base"/bin/fzf ]; then
|
||||
echo " - Already exists"
|
||||
check_binary && return
|
||||
elif [ -x "$fzf_base"/bin/$1 ]; then
|
||||
symlink $1
|
||||
check_binary && return
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user