Last active
January 26, 2020 04:37
-
-
Save psksvp/ad1db06d61b9756d51f5b27cc360ba6e to your computer and use it in GitHub Desktop.
Rename Xcode project (11.3.1 (11C504))
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
I put in the make file from https://stackoverflow.com/questions/33370175/how-do-i-completely-rename-an-xcode-project-i-e-inclusive-of-folders | |
It was originally written by https://stackoverflow.com/users/7641654/pietro-basso | |
__USE AT YOUR OWN RISK, ALWAYS BACK UP before doing this. You must read the post before using this.__ | |
The makefile needs `ack` and `rename` which can be install with `brew install ack rename` | |
put this file the project directory then run `make -f renameXcode.makefile OLD_NAME="oldname" NEW_NAME="newname"` |
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
## rename xocde project | |
## make -f renameXcode.makefile OLD_NAME="oldname" NEW_NAME="newname" | |
all: | |
find . -name '$(OLD_NAME)*' -print0 | xargs -0 rename --subst-all '$(OLD_NAME)' '$(NEW_NAME)' | |
find . -name '$(OLD_NAME)*' -print0 | xargs -0 rename --subst-all '$(OLD_NAME)' '$(NEW_NAME)' | |
ack --literal --files-with-matches '$(OLD_NAME)' --print0 | xargs -0 sed -i '' 's/$(OLD_NAME)/$(NEW_NAME)/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment