mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-30 11:33:28 +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() {
|
indent() {
|
||||||
if [ -n "$INDENT" ]; then
|
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
|
eval sed \'s\/^/"$INDENT"\/\' $1
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
cat $1
|
cat $1
|
||||||
fi
|
fi
|
||||||
@ -115,7 +111,7 @@ indent() {
|
|||||||
#
|
#
|
||||||
indent1() {
|
indent1() {
|
||||||
if [ -n "$INDENT" ]; then
|
if [ -n "$INDENT" ]; then
|
||||||
read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\' -
|
read_file $1 0 | eval sed \'s\/^/"$INDENT"\/\'
|
||||||
else
|
else
|
||||||
read_file $1 0
|
read_file $1 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user