X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=x;h=4309b82627c9c47917df4ef29c9ef8c4a3020544;hb=57d3c58ed6e0faf89a62411f96c000ffc9fd3937;hp=704d0f791f333d0ddca4c333a16fdf62643bb4c7;hpb=0650c4078c81211fbe112df90f019a96073e42ef;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