-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathv4-rename-script.sh
executable file
·41 lines (30 loc) · 1.73 KB
/
v4-rename-script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
echo "Script -> script rename migration"
function find_all() {
find . -name "*" -not \( -path "*/.git/*" -o -path "*/src_core/*" -o -path "*.xlsm" \) -type f -print0
}
## c2a-core ref
echo "rename c2a-core ref: src_core/Script -> src_core/script"
find_all | xargs -0 sed -i -e "s#src_core/Script/AddSection#src_core/add_section#g"
find_all | xargs -0 sed -i -e "s#src_core\\\Script\\\AddSection#src_core\\\script\\\add_section#g"
find_all | xargs -0 sed -i -e "s#src_core/Script/CI#src_core/script/ci#g"
find_all | xargs -0 sed -i -e "s#src_core\\\Script\\\CI#src_core\\\script\\\ci#g"
find_all | xargs -0 sed -i -e "s#src_core/Script/Git#src_core/script/git#g"
find_all | xargs -0 sed -i -e "s#src_core\\\Script\\\Git#src_core\\\script\\\git#g"
find_all | xargs -0 sed -i -e "s#src_core/Script#src_core/script#g"
find_all | xargs -0 sed -i -e "s#src_core\\\Script#src_core\\\script#g"
# C2A user code
echo "rename dir: src_user/Script -> src_user/script"
mv src/src_user/Script src/src_user/script
mv src/src_user/script/AddSection src/src_user/script/add_section
mv src/src_user/script/CI src/src_user/script/ci
mv src/src_user/script/Git src/src_user/script/git
echo "rename ref: src_user/Script -> src_user/script"
find_all | xargs -0 sed -i -e "s#Script/AddSection#script/add_section#g"
find_all | xargs -0 sed -i -e "s#Script\\\AddSection#script\\\add_section#g"
find_all | xargs -0 sed -i -e "s#Script/CI#script/ci#g"
find_all | xargs -0 sed -i -e "s#Script\\\CI#script\\\ci#g"
find_all | xargs -0 sed -i -e "s#Script/Git#script/git#g"
find_all | xargs -0 sed -i -e "s#Script\\\Git#script\\\git#g"
find_all | xargs -0 sed -i -e "s#src_user/Script#src_user/script#g"
find_all | xargs -0 sed -i -e "s#src_user\\\Script#src_user\\\script#g"