This topic created in 2283 days ago, the information mentioned may be changed or developed.
- 背景:brew 安装的 go 和 maven,有新版本不更新不舒服斯基
- 问题:更新后安装路径会变化,例如:/usr/local/Cellar/maven/3.6.2/libexec -> /usr/local/Cellar/maven/3.6.3/libexec
- 安装路径变化后,idea 里的 maven 路径,bash_profile 里的 M2_HOME,GOROOT 都需要改一遍
- 想过做个软链接,但是怎样做到通配符匹配,自动修改软链接指向的文件夹,类似 /usr/local/Cellar/maven/*/libexec 这样?
- 请教 v 站大佬们是怎样处理这种问题的,拜谢
Supplement 1 · Feb 12, 2020
3 replies • 2020-02-12 10:13:52 +08:00
 |
|
1
ewBuyVmLZMZE Feb 12, 2020 1
它们都会 link 到 /usr/local/opt 下面,如 /usr/local/opt/maven
|
 |
|
3
ewBuyVmLZMZE Feb 12, 2020
我的 Go 的 Shell 配置
```bash # Go export GOPATH=/Users/Yufan/.go export GOROOT=/usr/local/opt/go/libexec export GOBIN=$GOPATH/bin export GOPKG=$GOPATH/pkg export PATH=/usr/local/sbin:$GOROOT/bin:$GOBIN:$PATH ```
|