bin/setup-hg-git

changeset 839
0beae3c33263
parent 592
d20033330f55
child 892
ede01ab376a7
equal deleted inserted replaced
838:8ffc265b413a 839:0beae3c33263
1 #!/bin/sh 1 #!/bin/bash
2 set -eu 2 set -eu -o pipefail
3 3
4 if [ -d ~/.hgext/hg-git ]; then 4 if ! (command -v pip2 && pip2 -V) &>/dev/null; then
5 hg -R ~/.hgext/hg-git fetch 5 curl -fsSL --compressed https://bootstrap.pypa.io/get-pip.py |
6 else 6 python2 - --user
7 hg clone https://bitbucket.org/durin42/hg-git ~/.hgext/hg-git
8
9 [ -f ~/.hgext/hgrc ] || echo '[extensions]' > ~/.hgext/hgrc
10 echo 'hggit = ~/.hgext/hg-git/hggit' >> ~/.hgext/hgrc
11 fi 7 fi
12 8
9 pip2 install --user --upgrade hg-git
10
11 if ! grep -qsw hggit ~/.hgext/hgrc; then
12 printf '[extensions]\nhggit =\n' >> ~/.hgext/hgrc
13 fi

mercurial