mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-02 19:09:33 +01:00
Simplify line-continuaion awk program
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3728 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
c43ee9edc5
commit
097506c51d
@ -90,7 +90,7 @@ progress_message_and_save()
|
||||
indent() {
|
||||
if [ -n "$INDENT" ]; then
|
||||
if [ -n "$HAVEAWK" ]; then
|
||||
eval awk \''BEGIN { indent=1; }; { nextindent=indent; indent=1; }; /\\$/ { indent=0; }; { if (nextindent == 1) print "'"$INDENT"'" $0; else print; };'\' $1
|
||||
eval awk \''BEGIN { indent=1; }; { if (indent == 1) print "'"$INDENT"'" $0; else print; }; { indent=1; }; /\\$/ { indent=0; };'\' $1
|
||||
else
|
||||
eval sed \'s\/^/"$INDENT"\/\' $1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user