X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=x;h=4309b82627c9c47917df4ef29c9ef8c4a3020544;hb=bfd637a3cf85b80453db4a6e39802163b07319f7;hp=704d0f791f333d0ddca4c333a16fdf62643bb4c7;hpb=c1a5ec7faf6c32af2f0aae1af4420e1bb1a3a7fe;p=rust.git diff --git a/x b/x index 704d0f791f3..4309b82627c 100755 --- a/x +++ b/x @@ -29,5 +29,11 @@ for SEARCH_PYTHON in py python3 python python2; do exec "$python" $extra_arg "$xpy" "$@" fi done + +python=$(bash -c "compgen -c python" | grep '^python[2-3]\.[0-9]\+$' | head -n1) +if ! [ "$python" = "" ]; then + exec "$python" "$xpy" "$@" +fi + echo "$0: error: did not find python installed" >&2 exit 1