Skip to content

Commit

Permalink
update install_dep.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dej4vu committed Aug 7, 2024
1 parent 240a8df commit fd0f4f2
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions script/install_dep.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
#!/bin/sh
mkdir tmp
export GOPATH=$(pwd)/tmp
tmp=$(mktemp -d -t go-build)
dst="${1:-$HOME/bin}"

#go env setup
export GOPATH=$tmp
export GOPROXY=https://goproxy.cn,https://goproxy.io,direct
export GO111MODULE=on
#go clean -modcache
deps="github.com/stamblerre/gocode@latest \
github.com/josharian/impl@latest \
golang.org/x/tools/cmd/godoc@latest\
echo "GOPATH: $GOPATH"
deps="github.com/josharian/impl@latest \
github.com/davidrjenni/reftools/cmd/fillstruct@latest\
github.com/fatih/gomodifytags@latest\
golang.org/x/tools/cmd/guru@latest\
github.com/rogpeppe/godef@latest\
golang.org/x/lint/golint@latest\
golang.org/x/tools/cmd/gorename@latest\
github.com/sqs/goreturns@latest\
golang.org/x/tools/gopls@latest\
"
for dep in $deps
do
echo "installing $dep"
go install -v $dep
done

echo "moving binary files to $dst"
mv $tmp/bin/* $dst

#cleanup tmp files
echo "clean up tmp files"
go clean -cache -modcache
rm -rf $tmp

0 comments on commit fd0f4f2

Please sign in to comment.