Eld*_*sis 2 mercurial centos tortoisehg
如何在CentOS 6.5上安装Mercurial和TortoiseHG?
这不是微不足道的,因为没有官方RPM.
请参阅下面的过程作为bash脚本.
我希望这有帮助
此过程是来自多个位置的指令的连接.
使用以下内容创建脚本并以root身份运行.
#!/bin/bash
# Installation of mercurial and TortoiseHG
APPS_BASE=/opt
HG_BIN=$APPS_BASE/bin
HG_REPOS=$APPS_BASE/repos
checkResult()
{
if [ $1 -ne 0 ]
then
echo;echo ERROR: $2 failed;echo
exit 1
else
echo;echo Action $2 OK;echo
fi
}
######### Start here #########
echo;echo Adding epel-release repository
yum -y install http://ftp.uninett.no/linux/epel/6/i386/epel-release-6-8.noarch.rpm
checkResult $? "yum install epel-release"
# Get more prereq packages
echo;echo Install some more packages needed
yum -y install PyQt4-devel python-devel python-iniparse gcc gettext
checkResult $? "yum install PyQt4-devel python-devel python-iniparse gcc gettext"
yum --enablerepo=epel -y install qscintilla-python python-keyring python-sphinx Django
checkResult $? "yum install qscintilla-python python-keyring python-sphinx Django"
# Install Mercurial from source to bootstrap
echo;echo Get and install Mercurial from source
mkdir $HG_BIN $HG_REPOS
cd $HG_REPOS
wget https://www.mercurial-scm.org/release/mercurial-2.4.2.tar.gz
checkResult $? "wget for mercurial"
tar xzvf mercurial-2.4.2.tar.gz
cd mercurial-2.4.2/
make local
checkResult $? "make local for mercurial"
# Get a Mercurial clone, to stay up to date
echo;echo Get and install Mercurial stable
./hg clone https://www.mercurial-scm.org/repo/hg#stable ../hg
checkResult $? "hg clone https://www.mercurial-scm.org/repo/hg#stable"
cd ../hg
make local
checkResult $? "make local for mercurial stable"
echo;echo Create link for hg
cd $HG_BIN
ln -s $HG_REPOS/hg/hg .
# now get a TortoiseHg clone
echo;echo Get the TortoiseHG
cd $HG_REPOS
$HG_BIN/hg clone https://bitbucket.org/tortoisehg/thg thg
checkResult $? "hg clone https://bitbucket.org/tortoisehg/thg"
echo;echo Create links for thg
cd thg
ln -s ../hg/mercurial/
ln -s ../hg/hgext/
cd $HG_BIN
ln -s $HG_REPOS/thg/thg .
echo;echo Install kdiff3
yum -y install kdiff3
checkResult $? "yum install kdiff3"
# Cleanup
echo;echo Cleanup
rm -rf $HG_REPOS/mercurial-2.4.2/ $HG_REPOS/mercurial-2.4.2.tar.gz
echo;echo Add $HG_BIN to path
echo "export PATH=$HG_BIN:$PATH" >> /etc/profile
Run Code Online (Sandbox Code Playgroud)
完成后,您将有两个链接
/opt/bin/hg- mercurial
/opt/bin/thg- tortoiseHg
当然,您可以根据需要轻松移动物体.
编辑:如果有人知道如何让鹦鹉螺扩展工作,请在这里添加!
编辑2 :(由@ Will-I-am-davidon提供).需要安装更多的软件包来实现thg工作:yum install PyQt qscintilla qscintilla-python
| 归档时间: |
|
| 查看次数: |
8129 次 |
| 最近记录: |