-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrefactor.sh
executable file
·53 lines (40 loc) · 1.1 KB
/
refactor.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
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#
# Usage:
# ./refactor.sh <function name>
set -o nounset
set -o pipefail
set -o errexit
source build/common.sh
one() {
sed -i 's/module_paths/module_srcs/g' Makefile build/*.{py,sh}
sed -i 's/module-paths/module-srcs/g' Makefile build/*.{py,sh}
}
two() {
sed -i 's/c-module-manifest/module-manifest/g' Makefile build/*.{py,sh}
}
three() {
sed -i 's/module_manifest/c_module_toc/g' Makefile build/*.{py,sh}
sed -i 's/module-manifest/c-module-toc/g' Makefile build/*.{py,sh}
}
four() {
sed -i 's/runpy-/runpy-deps-/g' Makefile build/*.{py,sh}
}
five() {
sed -i 's/-deps-deps/-deps/g' Makefile build/*.{py,sh}
}
six() {
sed -i 's/all-c-modules/all-deps-c/g' Makefile build/*.{py,sh}
}
seven() {
sed -i 's/module_srcs/c_module_srcs/g' Makefile build/*.{py,sh}
sed -i 's/module-srcs/c_module-srcs/g' Makefile build/*.{py,sh}
}
eight() {
sed -i 's/c_module-srcs/c-module-srcs/g' Makefile build/*.{py,sh}
}
nine() {
find $PY27 -name '*.[ch]' | xargs sed -i 's/OIL_MAIN/OVM_MAIN/g'
find $PY27 -name '*.[ch]' | xargs sed -i 's/OIL_DISABLE_DLOPEN/OVM_DISABLE_DLOPEN/g'
}
"$@"