summaryrefslogtreecommitdiff
path: root/databases/postgres-xl/files/patch-contrib_pgxc__ctl_make__signature
blob: f36db344513d0643fd04a89620c43d02c2e3625c (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
--- contrib/pgxc_ctl/make_signature.orig	2017-04-19 15:17:02 UTC
+++ contrib/pgxc_ctl/make_signature
@@ -53,14 +53,20 @@ EOF
 
 
 cp pgxc_ctl_bash_2  pgxc_ctl_bash.c.wk
-ex pgxc_ctl_bash.c.wk <<EOF
-%s/"/\\\"/ge
-w
-%s/^\(.*\)$/"\1",/e
-%s/^"#ifdef XCP",$/#ifdef XCP/e
-%s/^"#endif",$/#endif/e
-wq
-EOF
+
+sed -i '' -e 's/"/\\\"/g' pgxc_ctl_bash.c.wk
+sed -i '' -e 's/^\(.*\)$/"\1",/' pgxc_ctl_bash.c.wk
+sed -i '' -e 's/^"#ifdef XCP",$/#ifdef XCP/' pgxc_ctl_bash.c.wk
+sed -i '' -e 's/^"#endif",$/#endif/' pgxc_ctl_bash.c.wk
+
+#ex pgxc_ctl_bash.c.wk <<EOF
+#%s/"/\\\"/ge
+#w
+#%s/^\(.*\)$/"\1",/e
+#%s/^"#ifdef XCP",$/#ifdef XCP/e
+#%s/^"#endif",$/#endif/e
+#wq
+#EOF
 
 cat > pgxc_ctl_bash.c <<EOF 
 /*
@@ -110,14 +116,19 @@ rm pgxc_ctl_bash.c.wk
 
 cp pgxc_ctl_conf_part_full pgxc_ctl_conf_part.wk
 
-ex pgxc_ctl_conf_part.wk <<EOF
-%s/"/\\\"/ge
-w
-%s/^\(.*\)$/"\1",/e
-%s/^"#ifdef XCP",$/#ifdef XCP/e
-%s/^"#endif",$/#endif/e
-wq
-EOF
+sed -i '' -e 's/"/\\\"/g' pgxc_ctl_conf_part.wk 
+sed -i '' -e 's/^\(.*\)$/"\1",/' pgxc_ctl_conf_part.wk
+sed -i '' -e 's/^"#ifdef XCP",$/#ifdef XCP/' pgxc_ctl_conf_part.wk
+sed -i '' -e 's/^"#endif",$/#endif/' pgxc_ctl_conf_part.wk
+
+#ex pgxc_ctl_conf_part.wk <<EOF
+#%s/"/\\\"/ge
+#w
+#%s/^\(.*\)$/"\1",/e
+#%s/^"#ifdef XCP",$/#ifdef XCP/e
+#%s/^"#endif",$/#endif/e
+#wq
+#EOF
 
 cat >> pgxc_ctl_bash.c <<EOF
 /*
@@ -141,14 +152,19 @@ rm pgxc_ctl_conf_part.wk
 
 cp pgxc_ctl_conf_part_minimal pgxc_ctl_conf_part.wk
 
-ex pgxc_ctl_conf_part.wk <<EOF
-%s/"/\\\"/ge
-w
-%s/^\(.*\)$/"\1",/e
-%s/^"#ifdef XCP",$/#ifdef XCP/e
-%s/^"#endif",$/#endif/e
-wq
-EOF
+sed -i '' -e 's/"/\\\"/g' pgxc_ctl_conf_part.wk 
+sed -i '' -e 's/^\(.*\)$/"\1",/' pgxc_ctl_conf_part.wk
+sed -i '' -e 's/^"#ifdef XCP",$/#ifdef XCP/' pgxc_ctl_conf_part.wk
+sed -i '' -e 's/^"#endif",$/#endif/' pgxc_ctl_conf_part.wk
+
+#ex pgxc_ctl_conf_part.wk <<EOF
+#%s/"/\\\"/ge
+#w
+#%s/^\(.*\)$/"\1",/e
+#%s/^"#ifdef XCP",$/#ifdef XCP/e
+#%s/^"#endif",$/#endif/e
+#wq
+#EOF
 
 cat >> pgxc_ctl_bash.c <<EOF
 /*
@@ -172,14 +188,19 @@ rm pgxc_ctl_conf_part.wk
 
 cp pgxc_ctl_conf_part_empty pgxc_ctl_conf_empty.wk
 
-ex pgxc_ctl_conf_empty.wk <<EOF
-%s/"/\\\"/ge
-w
-%s/^\(.*\)$/"\1",/e
-%s/^"#ifdef XCP",$/#ifdef XCP/e
-%s/^"#endif",$/#endif/e
-wq
-EOF
+sed -i '' -e 's/"/\\\"/g' pgxc_ctl_conf_empty.wk 
+sed -i '' -e 's/^\(.*\)$/"\1",/' pgxc_ctl_conf_empty.wk
+sed -i '' -e 's/^"#ifdef XCP",$/#ifdef XCP/' pgxc_ctl_conf_empty.wk
+sed -i '' -e 's/^"#endif",$/#endif/' pgxc_ctl_conf_empty.wk
+
+#ex pgxc_ctl_conf_empty.wk <<EOF
+#%s/"/\\\"/ge
+#w
+#%s/^\(.*\)$/"\1",/e
+#%s/^"#ifdef XCP",$/#ifdef XCP/e
+#%s/^"#endif",$/#endif/e
+#wq
+#EOF
 
 cat >> pgxc_ctl_bash.c <<EOF
 /*