fix: node path

This commit is contained in:
2024-11-01 17:44:30 +08:00
parent ff4629cafe
commit 12af360c37
2 changed files with 28 additions and 1 deletions
+3 -1
View File
@@ -36,10 +36,12 @@ set -gx HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles"
set -gx GOPATH $HOME/go:$HOME/workrepo/go set -gx GOPATH $HOME/go:$HOME/workrepo/go
set -gx GOPROXY "goproxy.cn,direct" set -gx GOPROXY "goproxy.cn,direct"
set -gx GOSUMDB "sum.golang.google.cn" set -gx GOSUMDB "sum.golang.google.cn"
add_to_path $HOME/go/bin add_to_path $HOME/go/bin
add_to_path $HOME/.yarn/bin $HOME/.config/yarn/global/node_modules/.bin add_to_path $HOME/.yarn/bin $HOME/.config/yarn/global/node_modules/.bin
# node
add_to_path /usr/local/node/bin
# add nvim # add nvim
add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin
set -gx EDITOR vim set -gx EDITOR vim
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
set -e
# install neovim
os_arch=$(uname -s)-$(uname -m)
case $os_arch in
"Darwin-x86_64")
cd /usr/local
wget https://golang.google.cn/dl/go1.23.2.linux-amd64.tar.gz
tar zxvf go1.23.2.linux-amd64.tar.gz
;;
"Linux-x86_64"|"Linux-arm64")
cd /tmp
rm -rf nvim-linux64.tar.gz
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
tar zxvf go1.23.2.linux-amd64.tar.gz
mv go /usr/local/
sudo ln -s /usr/local/go/bin/go/usr/local/bin/go
;;
esac