mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
18 lines
497 B
Bash
Executable File
18 lines
497 B
Bash
Executable File
#!/bin/sh
|
|
# Use any-python as interpreter in portable Python scripts.
|
|
# Instead of /usr/bin/env python use /usr/bin/env any-python
|
|
# The preferred choices are: Python 3, Python 2, anything called "python"
|
|
py3="$(command -v python3)"
|
|
py2="$(command -v python2)"
|
|
py_dunno="$(command -v python)"
|
|
if [ -n "$py3" ]; then
|
|
exec "$py3" "$@"
|
|
elif [ -n "$py2" ]; then
|
|
exec "$py2" "$@"
|
|
elif [ -n "$py_dunno" ]; then
|
|
exec "$py_dunno" "$@"
|
|
else
|
|
echo "cannot find any Python installation" >&2
|
|
exit 1
|
|
fi
|