rename a phoenix 1.3 project
#!/bin/bash | |
set -e | |
CURRENT_NAME="CurrentName" | |
CURRENT_OTP="current_name" | |
NEW_NAME="NewName" | |
NEW_OTP="new_name" | |
ack -l $CURRENT_NAME | xargs sed -i '' -e "s/$CURRENT_NAME/$NEW_NAME/g" | |
ack -l $CURRENT_OTP | xargs sed -i '' -e "s/$CURRENT_OTP/$NEW_OTP/g" | |
mv lib/$CURRENT_OTP lib/$NEW_OTP | |
mv lib/$CURRENT_OTP.ex lib/$NEW_OTP.ex | |
mv lib/${CURRENT_OTP}_web lib/${NEW_OTP}_web | |
mv lib/${CURRENT_OTP}_web.ex lib/${NEW_OTP}_web.ex |
This comment has been minimized.
This comment has been minimized.
Thank you for useful script!
|
This comment has been minimized.
This comment has been minimized.
Updated version for tests and not renaming the script itself: https://gist.github.com/krystofbe/92aed7cd03c9a631eb3c7af490525c4e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
There's also the tests to
mv