Last active
June 14, 2018 03:29
-
-
Save joeswann/e541b5ab51b9d4b65d55af2f57e0c47a to your computer and use it in GitHub Desktop.
[rails_engine_rename.sh]
This file contains 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
# Note, works best if your engine name isn't reserved | |
# Rename in files | |
find ~/www/rails/engines/old_engine/ -type f | xargs sed -i s/Old/New/g | |
find ~/www/rails/engines/old_engine/ -type f | xargs sed -i s/old/new/g | |
# Remove -n to run command | |
find ~/www/rails/engines/old_engine -type f -name '*' -print0 | xargs -0 rename -n 's/(.*)old\.(.*)/$new\.$2/g'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment