mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
Simplify INCLUDE fix
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5334 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
1bc2bed68e
commit
1ab9fb6fae
@ -100,11 +100,7 @@ progress_message_and_save()
|
||||
#
|
||||
indent() {
|
||||
if [ -n "$INDENT" ]; then
|
||||
if [ -n "$HAVEAWK" ]; then
|
||||
eval awk \''BEGIN { indent=1; }; /^\s*$/ { print ""; indent=1; next; }; { if (indent == 1) print "'"$INDENT"'" $0; else print; }; { indent=1; }; /\\$/ { indent=0; };'\' $1
|
||||
else
|
||||
eval sed \'s\/^/"$INDENT"\/\' $1
|
||||
fi
|
||||
else
|
||||
cat $1
|
||||
fi
|
||||
@ -115,7 +111,7 @@ indent() {
|
||||
#
|
||||
indent1() {
|
||||
if [ -n "$INDENT" ]; then
|
||||
read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\' -
|
||||
read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\'
|
||||
else
|
||||
read_file $1 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user