调用 macports svn 而不是预装的 mac svn
我在 ->/usr/bin/svn 处预装了 mac svn
我在 -->opt/local/var/macports/software/subversion/1.6.3_0/opt/local 处安装了 macport install svn
我的 .bash_profile 看起来像 导出 M2_HOME=/Users/teoh/work/maven 导出M2=$M2_HOME/bin 导出 PATH=$M2:$PATH
导出 JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export PATH=/Users/teoh/work/gwt-mac-1.5.3:$PATH
如何在每次使用 mac 中的控制台时将 macport svn 设置为默认 svn? 我需要在 .bash_profile 中放入什么?
i have mac preinstalled svn at ->/usr/bin/svn
i have macport install svn at -->opt/local/var/macports/software/subversion/1.6.3_0/opt/local
my .bash_profile look like
export M2_HOME=/Users/teoh/work/maven
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
export PATH=/Users/teoh/work/gwt-mac-1.5.3:$PATH
how to set macport svn as default svn each time i use the console in mac? what do i need to put in .bash_profile?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Macports 的默认安装链接到 /opt/local/bin 和 /opt/local/sbin。
添加:
因此,在 .bash_profile 末尾
应该可以让您访问 MacPorts svn。 我还想补充一点,奇怪的是,当您安装 MacPorts 时,它没有为您执行此操作。 检查 .bash_profile 中是否有与上面类似的行。 如果您有类似的行,请尝试将其移动到文件中较低的位置。
您还可以在 bash 中使用“which svn”来确定您正在使用哪个 subversion 副本。
The default install of Macports install links into /opt/local/bin and /opt/local/sbin.
So adding:
at the end of your .bash_profile should let you access MacPorts svn.
I would also like to add that it is odd that MacPorts didn't do this for you when you installed it. Check for the line similar to above in your .bash_profile. If you have a line like it then try moving it to a position lower in the file.
You can also use 'which svn' in bash to determine which copy of subversion you are using.
在你的 .bash_profile 文件中你可以输入:
In your .bash_profile file you can put:
您需要在预安装的 svn 位置之前的路径上设置 macport svn 位置。
you need to set the macport svn location on the path before the preinstalled svn location.