fileset

git mirror of https://ccx.te2000.cz/bzr/fileset
git clone https://ccx.te2000.cz/git/fileset
Log | Files | Refs | README

commit f05525714a786a7770ee50e643968c7e935c7b28
parent 5eb05908fde43fb6ae839949c28bf1cc5e987b37
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Fri,  5 May 2017 08:43:15 +0200

Use cat instead of print when we want the additional newline
Diffstat:
Mbin/fileset.awk | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/fileset.awk b/bin/fileset.awk @@ -191,7 +191,12 @@ function process_statement() { printf_fmt = ( \ crest ~ /n/ || (crest !~ /N/ && content !~ /\n$/) \ ) ? "%s\\n" : "%s" - funcs[func_name] = "\tprintf '"printf_fmt"' "quoted(content) + if(printf_fmt == "%s") { + # TODO: split into several when needed + funcs[func_name] = "\tprintf '"printf_fmt"' "quoted(content) + } else { + funcs[func_name] = "\tcat <<<"quoted(content) + } } if(crest ~ /a/) {