From 8bed6b458f7f790e494b5e6df2e29c40e19e2387 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 1 Nov 2006 01:02:01 +0000 Subject: [PATCH] Remove one step in a pipe-line git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4776 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/compiler | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Shorewall/compiler b/Shorewall/compiler index bba3f5ce1..1040874e0 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -4905,14 +4905,11 @@ __EOF__ } # -# Hack to fix up generated object +# Post-process generated script # -prepare_source() +mycat() { - awk \ - 'BEGIN {blnk=0;}; \ - /^\s*$/ {blnk=1; next; }; \ - { if (blnk == 1 ) print ""; blnk=0; print; }' - + awk 'BEGIN {blnk=0;}; /^\s*$/ {blnk=1; next; }; { if (blnk == 1 ) { print ""; blnk=0; }; print; }' $* } # @@ -5635,7 +5632,7 @@ __EOF__ progress_message3 "Shorewall configuration verified" else INDENT= - cat $(find_file prog.header) $OUTPUT $(find_file prog.footer) | prepare_source > $outfile + mycat $(find_file prog.header) $OUTPUT $(find_file prog.footer) > $outfile chmod 700 $outfile if [ -n "$EXPORT" ]; then exec 3>${outfile}.conf