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.
To view, visit change 43576. To unsubscribe, or for help writing mail filters, visit settings.