Last active
September 28, 2018 23:08
-
-
Save mkovalyk/f47a23b999d010cc6ffe6cdd7a6e317d to your computer and use it in GitHub Desktop.
Rename to Kotlin, commit and rename back to Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change directory to one passed as first parameter | |
cd $1 | |
#rename all files to kt | |
for f in *.java | |
do | |
filename="${f%.*}" | |
echo "Processing $f file.." | |
git mv $f $filename.kt | |
done | |
#commit files | |
git commit -a -m "Convert '$1' to Kotlin. Iteration #1" | |
# rename back to java files | |
for f in *.kt | |
do | |
filename="${f%.*}" | |
echo "Processing $f file.." | |
git mv $f $filename.java | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment