bin/setup-hg-evolve

changeset 985
349ea9f736b9
parent 892
ede01ab376a7
equal deleted inserted replaced
984:9c7c452cc87f 985:349ea9f736b9
1 #!/bin/bash 1 #!/bin/bash
2 set -eu -o pipefail 2 set -eu -o pipefail
3 3
4 if ! (command -v pip3 && pip3 -V) &>/dev/null; then 4 hg --version >/dev/null
5
6 shebang="$(head -n 1 $(which hg) | sed 's/^#!//')"
7
8 if ! ($shebang -m pip -V) &>/dev/null; then
5 curl -fsSL --compressed https://bootstrap.pypa.io/get-pip.py | 9 curl -fsSL --compressed https://bootstrap.pypa.io/get-pip.py |
6 python3 - --user 10 $shebang - --user
7 fi 11 fi
8 12
9 pip3 install --user --upgrade hg-evolve 13 $shebang -m pip install --user --upgrade hg-evolve
10 14
11 if ! grep -qsw evolve ~/.hgext/hgrc; then 15 if ! grep -qsw evolve ~/.hgext/hgrc; then
12 printf '[extensions]\nevolve =\n' >> ~/.hgext/hgrc 16 printf '[extensions]\nevolve =\n' >> ~/.hgext/hgrc
13 fi 17 fi
14 18

mercurial