Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here you are, "gradle build" works with this cleaned up and faster version (and the diff looks plausible on first sight):

   javas=$(find . -regex '.*\.java$')
   sed -i -E "$(printf 's/\\<(%s)\\>/Kt\\1/g;' $(grep -hrPo '\b(class|interface|record|enum) (?!Kt)(?!List\b)(?!Entry\b)\K[A-Z]\w+'))" $(echo $javas); 
   rename 's;\b(?!Kt)(\w+[.]java)$;Kt$1;' $(echo $javas)
(The $(echo $javas) is so it works in both bash and zsh).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: