forked from FactomProject/factomd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fix2.awk
46 lines (38 loc) · 1.12 KB
/
fix2.awk
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
# find . -name vendor -prune -o -name .git -prune -o -name \*.go | grep -v vendor | grep -v git | xargs awk -i inplace -f ~/fix2.awk
func fix(bad) {
orig = $0
good = toupper(substr(bad,1,1)) substr(bad,2)
if (FILENAME ~ /factomParams\.go/) {
rval += gsub(bad,good,$0)
}
rval += gsub("\\."bad,"."good,$0)
}
{
fix("prefix");
fix("rotate");
fix("timeOffset");
fix("keepMismatch");
fix("customNet");
fix("deadline");
fix("exposeProfiling");
fix("factomdLocations");
fix("factomdTLS");
fix("fast");
fix("fastLocation");
fix("logjson");
fix("loglvl");
fix("logstashURL");
fix("memProfileRate");
fix("pluginPath");
fix("rpcPassword");
fix("rpcUser");
fix("svm");
fix("torManage");
fix("torUpload");
fix("useLogstash");
if (rval != prval) {
printf("\r%5d",rval) > "/dev/stderr";
prval = rval;
}
print;
}