调用 macports svn 而不是预装的 mac svn

发布于 2024-07-26 04:55:54 字数 453 浏览 4 评论 0原文

我在 ->/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

随风而去 2024-08-02 04:55:54

Macports 的默认安装链接到 /opt/local/bin 和 /opt/local/sbin。

添加:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

因此,在 .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:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

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.

深居我梦 2024-08-02 04:55:54

在你的 .bash_profile 文件中你可以输入:

alias svn=/opt/local/var/macports/software/subversion/1.6.3_0/opt/local/bin/svn

In your .bash_profile file you can put:

alias svn=/opt/local/var/macports/software/subversion/1.6.3_0/opt/local/bin/svn
习ぎ惯性依靠 2024-08-02 04:55:54

您需要在预安装的 svn 位置之前的路径上设置 macport svn 位置。

you need to set the macport svn location on the path before the preinstalled svn location.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文