diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-16 08:04:28 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-16 08:04:28 +0300 |
| commit | aa909217505edb4459275b38182b6961f07e352c (patch) | |
| tree | 9f589ed16667b1d339ad1084d6a50a1bda857a83 | |
| parent | 58464468bb18b0bdc2e087ef52664bb5653d3d4e (diff) | |
| download | it-kariera-exam-template-aa909217505edb4459275b38182b6961f07e352c.tar it-kariera-exam-template-aa909217505edb4459275b38182b6961f07e352c.tar.gz it-kariera-exam-template-aa909217505edb4459275b38182b6961f07e352c.zip | |
Fixed project rename
| -rwxr-xr-x | tools/rename-project.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/rename-project.sh b/tools/rename-project.sh index b0d6d0b..722650a 100755 --- a/tools/rename-project.sh +++ b/tools/rename-project.sh @@ -34,12 +34,14 @@ rename () { done } +mv ../$original_name ../$new_name + # Rename all directories and then files -rename $(find ../ -type d -name "*$original_name*") -rename $(find ../ -type f -name "*$original_name*") +rename $(find ../$new_name -type d -name "*$original_name*") +rename $(find ../$new_name -type f -name "*$original_name*") # Rename all occurences inside files -find ../ -type f -not -path "../tools/*" -not -path "../.git/*" -print0 | xargs -0 sed -i "s/$original_name/$new_name/g" +find ../$new_name -type f -not -path "../tools/*" -not -path "../.git/*" -print0 | xargs -0 sed -i "s/$original_name/$new_name/g" # The database context is named TemplateContext by default # A third paramter should never be given, the second check is to prevent stack overflow |
