andrei.gosman@gmail.com has posted comments on this change by andrei.gosman@gmail.com. ( https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email )
Change subject: mgcp_client: generate mgcp_common.h with printf ......................................................................
Patch Set 3:
Good point, no real reason to split. The single-string form is closer to the original minus the -e bug, smaller diff, and equally portable: POSIX printf expands \n in the format string on every shell. Split-into-args was defensive against embedded escapes in shell strings, but printf handles \n itself in the format string, so there is nothing to defend against. Reworked in patchset 3:
printf '/*\n\n DO NOT EDIT THIS FILE!\n THIS IS OVERWRITTEN DURING BUILD\n This is an automatic copy of <osmocom/mgcp/mgcp_common.h>\n\n */\n' > mgcp_common.h
Byte-identical output to patchset 2 and to what a working `echo -e` would have produced: 7 lines, 7 newlines, 132 bytes, same sha256. Verified with diff, and by running the recipe line through bash, dash, ksh and zsh.