Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ##############################################
- ##The script must be executed inside p4vasp-0.3.26/ source folder.
- ##All "python" calls will be changed to specifically be "python2" ones.
- ##############################################
- ##Required packages libx11 mesa libglapi libegl python2 python2-numpy
- ## and libgl (only if you're not using nvidia-utils)
- a=`find ./ -iname '*.py' | xargs head -1 | awk '/python/ { print x }; { x=$2 }' | xargs ls`
- echo " "
- echo "Correcting in"
- echo $a
- echo 'header from "/usr/bin/python" to "/usr/bin/python2"'
- echo 'or header from "/usr/bin/env python" to "/usr/bin/env python2"'
- for i in $a
- do
- sed -i 's/\/usr\/bin\/python/\/usr\/bin\/python2/' $i
- done
- sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python2/' test/test.py
- sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python2/' odpdom/setup.py
- sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python2/' src/fltk-config.py
- sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python2/' ./p4v.py
- echo " "
- echo "Printing header corrected "
- for i in $a
- do
- head -1 $i
- done
- ##Fixing makefiles
- sed -i 's/python configure.py/python2 configure.py/' Makefile
- sed -i 's/python makeappletlist.py/python2 makeappletlist.py/' Makefile
- sed -i 's/exec python /exec python2 /' Makefile
- sed -i 's/python -c /python2 -c /' odpdom/Makefile
- sed -i 's/python fltk-config.py/python2 fltk-config.py/' src/Configuration.mk
- sed -i 's/python -c/python2 -c/' src/Configuration.mk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement