--- git-cinnabar.orig 2022-06-13 11:59:59.000000000 -0600 +++ git-cinnabar 2022-06-13 12:00:23.000000000 -0600 @@ -1,21 +1,4 @@ -#!/bin/sh -''':' -py="$GIT_CINNABAR_PYTHON" -if test -z "$py"; then - for py in python3 python2.7 python2; do - "$py" -c "from mercurial import hg" >/dev/null 2>&1 && break - py= - done -fi -if test -z "$py"; then - for py in python3 python2.7 python2; do - command -v "$py" > /dev/null && break - py=python3 - done -fi -exec "$py" "$0" "$@" -exit 1 -''' +#!/usr/bin/env python import os import sys --- git-remote-hg.orig 2022-06-13 11:59:59.000000000 -0600 +++ git-remote-hg 2022-06-13 12:00:30.000000000 -0600 @@ -1,21 +1,4 @@ -#!/bin/sh -''':' -py="$GIT_CINNABAR_PYTHON" -if test -z "$py"; then - for py in python3 python2.7 python2; do - "$py" -c "from mercurial import hg" >/dev/null 2>&1 && break - py= - done -fi -if test -z "$py"; then - for py in python3 python2.7 python2; do - command -v "$py" > /dev/null && break - py=python3 - done -fi -exec "$py" "$0" "$@" -exit 1 -''' +#!/usr/bin/env python from __future__ import division import os