m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Update install script to download tarball

This commit is contained in:
Junegunn Choi
2015-01-04 02:00:22 +09:00
parent 40d0a6347c
commit 9930a1d4d9
2 changed files with 13 additions and 5 deletions

11
install
View File

@@ -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