Forked from krystofbe/rename_phoenix_project.sh
Last active
February 9, 2023 19:24
-
-
Save cadebward/e2330496730f787beaa8ef3559bbe85e to your computer and use it in GitHub Desktop.
rename a phoenix 1.3 project
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
#!/bin/bash | |
set -e | |
CURRENT_NAME="WatchParty" | |
CURRENT_OTP="watch-party" | |
NEW_NAME="Chat" | |
NEW_OTP="chat" | |
ack -l $CURRENT_NAME --ignore-file=is:rename_phoenix_project.sh | xargs sed -i '' -e "s/$CURRENT_NAME/$NEW_NAME/g" | |
ack -l $CURRENT_OTP --ignore-file=is:rename_phoenix_project.sh | 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 | |
mv test/$CURRENT_OTP test/$NEW_OTP | |
mv test/${CURRENT_OTP}_web test/${NEW_OTP}_web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment