diff --git a/files/zsh/80-env.zsh b/files/zsh/80-env.zsh index c554104..d2969d0 100644 --- a/files/zsh/80-env.zsh +++ b/files/zsh/80-env.zsh @@ -5,12 +5,12 @@ if [ -d "$HOME/.local/bin" ]; then fi # Docker -if [ -f "~/.config/systemd/user/docker.service" ]; then +if [ -f "$HOME/.config/systemd/user/docker.service" ]; then export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock fi # Golang -if command_exists go; then +if [ -f "/usr/local/go/bin/go" ]; then export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:$HOME/.local/go/bin fi diff --git a/files/zsh/81-proxy.zsh b/files/zsh/81-proxy.zsh index ed8b3db..45f9ec8 100644 --- a/files/zsh/81-proxy.zsh +++ b/files/zsh/81-proxy.zsh @@ -1,5 +1,5 @@ # Golang -if command_exists go; then +if [ -f "/usr/local/go/bin/go" ]; then export GO111MODULE=on export GOPROXY=https://goproxy.cn,direct fi diff --git a/init_priv.sh b/init_priv.sh index 0d6bea4..488e19c 100755 --- a/init_priv.sh +++ b/init_priv.sh @@ -114,9 +114,11 @@ configure_zsh() { cp $scriptdir/files/zsh/20-function.zsh ~/.oh-my-zsh/custom/ cp $scriptdir/files/zsh/50-alias.zsh ~/.oh-my-zsh/custom/ cp $scriptdir/files/zsh/80-env.zsh ~/.oh-my-zsh/custom/ - cp $scriptdir/files/zsh/81-proxy.zsh ~/.oh-my-zsh/custom/ cp $scriptdir/files/zsh/90-other.zsh ~/.oh-my-zsh/custom/ cp $scriptdir/files/zsh/ys-simple.zsh-theme ~/.oh-my-zsh/custom/themes/ + + [ $abroad -eq 1 ] && return + cp $scriptdir/files/zsh/81-proxy.zsh ~/.oh-my-zsh/custom/ fi }