Merge branch 'paulohefagundes/remove_which'
This commit is contained in:
commit
2dc876cd65
2 changed files with 4 additions and 4 deletions
|
@ -7,9 +7,9 @@
|
||||||
# is useful because we don't know the name of the python binary.
|
# is useful because we don't know the name of the python binary.
|
||||||
|
|
||||||
''':' # begin python string; this line is interpreted by the shell as `:`
|
''':' # begin python string; this line is interpreted by the shell as `:`
|
||||||
which python >/dev/null 2>&1 && exec python "$0" "$@"
|
command -v python >/dev/null 2>&1 && exec python "$0" "$@"
|
||||||
which python3 >/dev/null 2>&1 && exec python3 "$0" "$@"
|
command -v python3 >/dev/null 2>&1 && exec python3 "$0" "$@"
|
||||||
which python2 >/dev/null 2>&1 && exec python2 "$0" "$@"
|
command -v python2 >/dev/null 2>&1 && exec python2 "$0" "$@"
|
||||||
>&2 echo "error: cannot find python"
|
>&2 echo "error: cannot find python"
|
||||||
exit 1
|
exit 1
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -31,7 +31,7 @@ touch ~/tmp_bin/python &&
|
||||||
chmod +x ~/tmp_bin/python &&
|
chmod +x ~/tmp_bin/python &&
|
||||||
cat >> ~/tmp_bin/python <<EOF
|
cat >> ~/tmp_bin/python <<EOF
|
||||||
#!$HOME/tmp_bin/bash
|
#!$HOME/tmp_bin/bash
|
||||||
exec $(which python)
|
exec $(command -v python)
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue