diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-12 15:34:16 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-05-12 15:34:16 +0300 |
| commit | ad5a3c3ffa994c2ed079f34eea6241a9c4a40786 (patch) | |
| tree | 92592a02eb4e818edc545d71421bee94b591c570 /tools/rename-namespaces.sh | |
| parent | 10651adee4fd7b62a549539965ce51249521974c (diff) | |
| download | it-kariera-exam-template-ad5a3c3ffa994c2ed079f34eea6241a9c4a40786.tar it-kariera-exam-template-ad5a3c3ffa994c2ed079f34eea6241a9c4a40786.tar.gz it-kariera-exam-template-ad5a3c3ffa994c2ed079f34eea6241a9c4a40786.zip | |
Improved rename namespaces
Diffstat (limited to 'tools/rename-namespaces.sh')
| -rwxr-xr-x | tools/rename-namespaces.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/rename-namespaces.sh b/tools/rename-namespaces.sh index 6e0dc8f..543cbe8 100755 --- a/tools/rename-namespaces.sh +++ b/tools/rename-namespaces.sh @@ -17,5 +17,7 @@ elif [ ! -z "$2" ]; then new_name="$2." fi -find ../ -type f -not -path "*obj*" -not -path "*bin*" -exec sed -i "s/namespace $original_name/namespace $new_name/g" {} \; -find ../ -type f -not -path "*obj*" -not -path "*bin*" -exec sed -i "s/using $original_name/using $new_name/g" {} \; +keywords=("namespace" "using" "model") +for keyword in "${keywords[@]}"; do + find ../ -type f -not -path "*obj*" -not -path "*bin*" -exec sed -i "s/$keyword $original_name/$keyword $new_name/g" {} \; +done |
