Created
November 13, 2009 04:43
-
-
Save cvmat/233596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[extensions] | |
hgext.bookmarks= | |
git=~/local/mercurial/lib/python/hggit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# "To install Mercurial" | |
# make install-mercurial | |
# | |
# "To install ZSH completion file for Mercurial" | |
# make install-mercurial-zsh-completion | |
# | |
# "To install 'forest' extension for Mercurial" | |
# make install-mercurial-forest-extension | |
# | |
# "To install 'hggit' extension for Mercurial" | |
# make install-dulwich install-mercurial-hg-git-extension | |
# | |
DEST_BASEDIR=${HOME}/local | |
PYTHON=python | |
TAR=tar | |
WGET=wget | |
# "Mercurial - Mercurial" | |
# http://www.selenic.com/mercurial/ | |
MERCURIAL_URL_BASE=http://selenic.com/repo/index.cgi/hg-stable/raw-file/tip | |
install-mercurial: $(MKDIR_WITH_CHECK) install-hgeditor | |
( \ | |
ARCHIVE_URL=http://mercurial.selenic.com/release/mercurial-1.3.1.tar.gz; \ | |
ARCHIVE=`basename $${ARCHIVE_URL}` ; \ | |
ARCHIVE_DIR=`echo $${ARCHIVE} | sed -e 's/^\(.*\).tar.gz$$/\1/' ` ; \ | |
INSTALLDIR=${DEST_BASEDIR}/mercurial ; \ | |
[ ! -e $${INSTALLDIR} ] || mv $${INSTALLDIR} $${INSTALLDIR}.bak`date +%Y%m%d-%H%M` ; \ | |
TMPDIR=`mktemp -t -d [email protected]` ; \ | |
cd $${TMPDIR} ; \ | |
$(WGET) $${ARCHIVE_URL} ; \ | |
$(TAR) zxvf $${ARCHIVE} ; \ | |
cd $${ARCHIVE_DIR} ; \ | |
$(PYTHON) setup.py install --home=$${INSTALLDIR} --force ; \ | |
export PYTHONPATH=$${INSTALLDIR}/lib/python ; \ | |
export PATH=$${INSTALLDIR}/bin:$${PATH} ; \ | |
cd ; \ | |
hg debuginstall ; \ | |
rm -r $${TMPDIR} ; \ | |
echo 'add the below configuration.' ; \ | |
echo 'export PYTHONPATH='$${INSTALLDIR}'/lib/python:$$PYTHONPATH' ; \ | |
echo 'export PATH='$${INSTALLDIR}'/bin:$$PATH' ; \ | |
) 2>&1 | tee [email protected] | |
install-mercurial-zsh-completion: | |
mkdir -p ${HOME}/.zsh \ | |
&& cd ${HOME}/.zsh \ | |
&& $(WGET) --output-document=_hg $(MERCURIAL_URL_BASE)/contrib/zsh_completion | |
# "ForestExtension - Mercurial" | |
# http://www.selenic.com/mercurial/wiki/index.cgi/ForestExtension | |
install-mercurial-forest-extension: | |
( \ | |
INSTALLDIR=${DEST_BASEDIR}/mercurial/lib/python/hgext ; \ | |
FILE_URL=http://bitbucket.org/pmezard/hgforest-crew/raw/tip/forest.py; \ | |
[ -d $${INSTALLDIR} ] && $(WGET) -NK -P $${INSTALLDIR} $${FILE_URL} ; \ | |
) | |
# "Hg-Git Mercurial Plugin" | |
# http://hg-git.github.com/ | |
# "HgGit - Mercurial" | |
# http://mercurial.selenic.com/wiki/HgGit | |
install-mercurial-hg-git-extension: | |
( \ | |
INSTALLDIR=${DEST_BASEDIR}/mercurial ; \ | |
TMPDIR=`mktemp -t -d [email protected]` ; \ | |
URL=http://github.com/schacon/hg-git/tarball/master ; \ | |
cd $${TMPDIR} \ | |
&& $(WGET) $${URL} \ | |
&& $(TAR) zxvf schacon-hg-git-*.tar.gz ; \ | |
cd $${TMPDIR} ; \ | |
DIR=`find . -maxdepth 1 -type d -iname 'schacon-hg-git-*' -print -quit` ; \ | |
cd $${TMPDIR} \ | |
&& [ -d $${DIR} ] \ | |
&& cd $${DIR} \ | |
&& mkdir -p $${INSTALLDIR} \ | |
&& $(PYTHON) setup.py install --home=$${INSTALLDIR} --force \ | |
&& cd \ | |
&& rm -r $${TMPDIR} \ | |
) 2>&1 | tee [email protected] | |
install-dulwich: | |
( \ | |
INSTALLDIR=${DEST_BASEDIR}/dulwich ; \ | |
URL=http://samba.org/~jelmer/dulwich/dulwich-0.4.0.tar.gz ; \ | |
ARCHIVE=$${URL##*/} ; \ | |
ARCHIVE_DIR=$${ARCHIVE%.tar.gz} ; \ | |
TMPDIR=`mktemp -t -d [email protected]` ; \ | |
cd $${TMPDIR} \ | |
&& $(WGET) $${URL} \ | |
&& $(TAR) zxvf $${ARCHIVE} \ | |
&& cd $${ARCHIVE_DIR} \ | |
&& mkdir -p $${INSTALLDIR} \ | |
&& $(PYTHON) setup.py install --home=$${INSTALLDIR} --force \ | |
&& echo 'add the below configuration.' \ | |
&& echo 'export PYTHONPATH='$${INSTALLDIR}'/lib/python:$$PYTHONPATH' \ | |
&& cd \ | |
&& rm -r $${TMPDIR} \ | |
) 2>&1 | tee [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment