Make #!/usr/bin/env python in test-bdiff run the specified python version.
authorThomas Arendsen Hein <thomas@intevation.de>
Fri, 10 Mar 2006 19:16:49 +0100
changeset 1878 a5c46cff620f
parent 1877 d314a89fa4f1
child 1879 9ef0850b9b68
Make #!/usr/bin/env python in test-bdiff run the specified python version.
tests/run-tests
--- a/tests/run-tests	Fri Mar 10 08:31:31 2006 -0800
+++ b/tests/run-tests	Fri Mar 10 19:16:49 2006 +0100
@@ -53,7 +53,16 @@
 fi
 cd "$TESTDIR"
 
-PATH="$INST/bin:$PATH"; export PATH
+BINDIR="$INST/bin"
+PATH="$BINDIR:$PATH"; export PATH
+if [ -n "$PYTHON" ]; then
+    {
+        echo "#!/bin/sh"
+        echo "exec \"$PYTHON"'" "$@"'
+    } > "$BINDIR/python"
+    chmod 755 "$BINDIR/python"
+fi
+
 PYTHONPATH="$PYTHONDIR"; export PYTHONPATH
 
 run_one() {