summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-01-04 02:00:22 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-01-04 02:00:22 +0900
commit9930a1d4d9cf92fe869f9352177dd24bdf1ac13f (patch)
treed97e42cd14ad2c933b59492dfeed051c1df4ddd4 /install
parent40d0a6347c65b523d60f8d7898eafc42e1e4a3b6 (diff)
Update install script to download tarball
Diffstat (limited to 'install')
-rwxr-xr-xinstall11
1 files changed, 8 insertions, 3 deletions
diff --git a/install b/install
index 6b64a3f2..5a999301 100755
--- a/install
+++ b/install
@@ -6,16 +6,21 @@ fzf_base=`pwd`
ARCHI=$(uname -sm)
download() {
+ mkdir -p "$fzf_base"/bin
+ cd "$fzf_base"/bin
echo "Downloading fzf executable ($1) ..."
- if curl -fLo "$fzf_base"/bin/fzf https://github.com/junegunn/fzf-bin/releases/download/snapshot/$1; then
- chmod +x "$fzf_base"/bin/fzf
+ if curl -fL \
+ https://github.com/junegunn/fzf-bin/releases/download/snapshot/${1}.tar.gz |
+ tar -xz; then
+ mv $1 fzf
+ chmod +x fzf
else
echo "Failed to download $1"
exit 1
fi
+ cd - > /dev/null
}
-mkdir -p "$fzf_base"/bin
if [ "$ARCHI" = "Darwin x86_64" ]; then
download fzf_darwin_amd64
elif [ "$ARCHI" = "Linux x86_64" ]; then