mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 22:30:58 +01:00
Tweak INCLUDE fix
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5331 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
1d6b3cab47
commit
7857dc8719
@ -96,14 +96,15 @@ progress_message_and_save()
|
||||
}
|
||||
|
||||
#
|
||||
# Echo the contents of the passed file indented by $INDENT
|
||||
# If a filename is passed, then echo the contents of that file indented by $INDENT and perform INCLUDE processing.
|
||||
# If no filename is passed, then echo the contents of STDIN intended by $INDENT but do not perform INCLUDE processing.
|
||||
#
|
||||
indent() {
|
||||
if [ -n "$INDENT" ]; then
|
||||
if [ $# -ge 1 ]; then
|
||||
read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\' -
|
||||
else
|
||||
eval sed \'s\/^/"$INDENT"\/\' $1
|
||||
eval sed \'s\/^/"$INDENT"\/\'
|
||||
fi
|
||||
elif [ $# -ge 1 ]; then
|
||||
read_file $1 0
|
||||
|
@ -1586,7 +1586,7 @@ read_file() # $1 = file name, $2 = nest count
|
||||
{
|
||||
local first rest
|
||||
|
||||
if [ -f $1 ]; then
|
||||
if [ -f $1 ]; then
|
||||
while read first rest; do
|
||||
if [ "x$first" = "xINCLUDE" ]; then
|
||||
if [ $2 -lt 4 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user