From 24516bcf4d3be8a1a626b6ccdbe79a740fd5754f Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 9 May 2016 02:03:08 +0900 Subject: [PATCH] [install] Set a temporary GOPATH --- install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install b/install index 6d2e886..8ca5cbe 100755 --- a/install +++ b/install @@ -231,9 +231,13 @@ if [ -n "$binary_error" ]; then echo "No prebuilt binary for $archi ..." if command -v go > /dev/null; then echo -n "Building binary (go get github.com/junegunn/fzf/src/fzf) ... " + if [ -z "${GOPATH-}" ]; then + export GOPATH="${TMPDIR:-/tmp}/fzf-gopath" + mkdir -p "$GOPATH" + fi if go get github.com/junegunn/fzf/src/fzf; then echo "OK" - link_fzf_in_path + cp "$GOPATH/bin/fzf" "$fzf_base/bin/" else echo "Failed to build binary ..." install_ruby_fzf