MacOS 如何安装 SVN 命令终端
I purchased a new Mac running Mac OS X v10.8.5 (Mountain Lion). I’ve seen it written in various places that SVN is installed on OS X by default, but when I open a terminal and type which svn the program is not found. I’ve also run find / -name svn to check if it’s installed somewhere that hasn’t been added the the PATH variable.
?
So it seems like svn is not installed. Where can I get an OS X version of the official command-line SVN client?
The default SVN version which is installed along with Xcode command line tools is 1.7.x. If you’re fine with this version, than that should be enough. I want to select my SVN version and for that I’m using Homebrew.
Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"Make sure that brew’s executables are first in your environment path. Check in your .bash_profile that path is set as follows:
export PATH=/usr/local/bin:${PATH} source ~/.bash_profileInstall SVN:
brew install svnTo install a specific SVN version, check available versions:
brew versions svnThis command will list all available SVN versions.
Here’s how you can install other than the default version (based on this gist)
Now that the older SVN version is installed, we can re-install the latest formula in order to keep our repository clean:
git checkout -- Library/Formula/subversion.rbNow you can switch between versions using svn switch command.
總結
以上是生活随笔為你收集整理的MacOS 如何安装 SVN 命令终端的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 游戏服务器防止ddos攻击(游戏ddos
- 下一篇: 如何在 MacOS 环境下搭建 SVN