Allow for $PYTHON environment variable specifying python binary to use
authorRocco Rutte <pdmef@gmx.net>
Mon, 22 Oct 2007 07:34:40 +0000 (09:34 +0200)
committerRocco Rutte <pdmef@gmx.net>
Mon, 22 Oct 2007 07:34:40 +0000 (09:34 +0200)
Signed-off-by: Rocco Rutte <pdmef@gmx.net>
hg-fast-export.sh
hg-reset.sh

index 5d5674a..f9d1dd6 100755 (executable)
@@ -10,6 +10,7 @@ SFX_MARKS="marks"
 SFX_HEADS="heads"
 SFX_STATE="state"
 QUIET=""
+PYTHON=${PYTHON:python}
 
 USAGE="[--quiet] [-r <repo>] [-m <max>] [-s] [-A <file>]"
 LONG_USAGE="Import hg repository <repo> up to either tip or <max>
@@ -62,7 +63,7 @@ if [ ! -f "$GIT_DIR/$PFX-$SFX_MARKS" ] ; then
   touch "$GIT_DIR/$PFX-$SFX_MARKS"
 fi
 
-GIT_DIR="$GIT_DIR" python "$ROOT/hg-fast-export.py" \
+GIT_DIR="$GIT_DIR" $PYTHON "$ROOT/hg-fast-export.py" \
   --repo "$REPO" \
   --marks "$GIT_DIR/$PFX-$SFX_MARKS" \
   --heads "$GIT_DIR/$PFX-$SFX_HEADS" \
index 4204005..63d7fe1 100755 (executable)
@@ -10,6 +10,7 @@ SFX_MARKS="marks"
 SFX_HEADS="heads"
 SFX_STATE="state"
 QUIET=""
+PYTHON=${PYTHON:python}
 
 USAGE="[-r <repo>] -R <rev>"
 LONG_USAGE="Print SHA1s of latest changes per branch up to <rev> useful
@@ -54,7 +55,7 @@ if [ ! -f "$GIT_DIR/$PFX-$SFX_MARKS" ] ; then
   touch "$GIT_DIR/$PFX-$SFX_MARKS"
 fi
 
-GIT_DIR="$GIT_DIR" python "$ROOT/hg-reset.py" \
+GIT_DIR="$GIT_DIR" $PYTHON "$ROOT/hg-reset.py" \
   --repo "$REPO" \
   --marks "$GIT_DIR/$PFX-$SFX_MARKS" \
   --heads "$GIT_DIR/$PFX-$SFX_HEADS" \