2018-07-20 19:28:21 +05:30
|
|
|
#! /usr/bin/env bash
|
|
|
|
if [ $1x != 3to2x ]; then
|
|
|
|
echo 'python2.7 to python'
|
2018-09-26 12:32:52 +05:30
|
|
|
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python2.7/usr\/bin\/env python/g'
|
2018-07-20 19:28:21 +05:30
|
|
|
else
|
|
|
|
echo 'python to python2.7'
|
2018-11-16 13:39:36 +05:30
|
|
|
find . -name '*.py' -type f | xargs sed -i '/2.7/! s/usr\/bin\/env python/usr\/bin\/env python2.7/g'
|
2018-07-20 19:28:21 +05:30
|
|
|
fi
|