autodetect python version

This commit is contained in:
rasbt 2014-05-21 17:44:05 -04:00
parent 80fb307f24
commit f71bcde1b3

View File

@ -8,8 +8,10 @@
# >> python myscript.py
# prepends !#/usr/bin/python to all .py files
python_ver=$(which python)
find ./ -maxdepth 1 -name "*.py" -exec sed -i.bak '1i\
#!/usr/bin/env/python
#!/usr/bin/env/python"$python_ver"
' {} \;
# removes temporary files