1 #!/bin/bash |
1 #!/bin/bash |
2 set -eu -o pipefail |
2 set -eu -o pipefail |
3 |
3 |
4 if ! (command -v pip2 && pip2 -V) &>/dev/null; then |
4 if ! (command -v pip3 && pip3 -V) &>/dev/null; then |
5 curl -fsSL --compressed https://bootstrap.pypa.io/get-pip.py | |
5 curl -fsSL --compressed https://bootstrap.pypa.io/get-pip.py | |
6 python2 - --user |
6 python3 - --user |
7 fi |
7 fi |
8 |
8 |
9 pip2 install --user --upgrade hg-git |
9 pip3 install --user --upgrade hg-git |
10 |
10 |
11 if ! grep -qsw hggit ~/.hgext/hgrc; then |
11 if ! grep -qsw hggit ~/.hgext/hgrc; then |
12 printf '[extensions]\nhggit =\n' >> ~/.hgext/hgrc |
12 printf '[extensions]\nhggit =\n' >> ~/.hgext/hgrc |
13 fi |
13 fi |