--- 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 /*