Created
July 30, 2016 17:40
-
-
Save nerdyworm/3d623b13bf0d6d664373e2f501f16423 to your computer and use it in GitHub Desktop.
rename a phoenix project
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
#!/bin/bash | |
set -e | |
CURRENT_NAME="CurentName" | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a fork updated for Phoenix 1.3
https://gist.github.com/kumekay/8f4c8c0b88152a83c989d45f1fab810a