2018-07-20 19:28:21 +05:30
|
|
|
#! /usr/bin/env bash
|
|
|
|
if [ $1x != 3to2x ]; then
|
2018-11-17 16:45:33 +05:30
|
|
|
echo 'python2.7 to python3'
|
|
|
|
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python2.7/usr\/bin\/env python3/g'
|
2018-07-20 19:28:21 +05:30
|
|
|
else
|
2018-11-17 16:45:33 +05:30
|
|
|
echo 'python3 to python2.7'
|
|
|
|
find . -name '*.py' -type f | xargs sed -i 's/usr\/bin\/env python3/usr\/bin\/env python2.7/g'
|
2018-07-20 19:28:21 +05:30
|
|
|
fi
|