summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-08-02 15:09:57 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-08-02 15:09:57 +0900
commit7833fa739667f2f1ad400f02d6ff3767c4cf6fc8 (patch)
tree994f515e9b48eb940e6e9330dae773b80d594977 /install
parent9278f3acd2cb838f8bd9b9b425d30782a7c718c1 (diff)
[install] Always download binary when --pre is set
Diffstat (limited to 'install')
-rwxr-xr-xinstall16
1 files changed, 9 insertions, 7 deletions
diff --git a/install b/install
index 1930fca2..41078f86 100755
--- a/install
+++ b/install
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
-version=0.10.1
-[[ "$@" =~ --pre ]] && version=0.10.2
+[[ "$@" =~ --pre ]] && version=0.10.2 pre=1 ||
+ version=0.10.1 pre=0
cd $(dirname $BASH_SOURCE)
fzf_base=$(pwd)
@@ -46,11 +46,13 @@ symlink() {
download() {
echo "Downloading bin/fzf ..."
- if [[ ! $1 =~ dev && -x "$fzf_base"/bin/fzf ]]; then
- echo " - Already exists"
- check_binary && return
- elif [ -x "$fzf_base"/bin/$1 ]; then
- symlink $1 && check_binary && return
+ if [ $pre = 0 ]; then
+ 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
fi
mkdir -p "$fzf_base"/bin && cd "$fzf_base"/bin
if [ $? -ne 0 ]; then