Sun, 25 Apr 2021 00:57:55 -0500
ok this format-on-write is more reliable
#!/bin/bash set -eu -o pipefail if ! (command -v pip3 && pip3 -V) &>/dev/null; then curl -fsSL --compressed https://bootstrap.pypa.io/get-pip.py | python3 - --user fi pip3 install --user --upgrade hg-evolve if ! grep -qsw evolve ~/.hgext/hgrc; then printf '[extensions]\nevolve =\n' >> ~/.hgext/hgrc fi if ! grep -qsw topic ~/.hgext/hgrc; then printf '[extensions]\ntopic =\n' >> ~/.hgext/hgrc fi