Merge pull request #349 from asteven/issue/349

__block creates duplicates
This commit is contained in:
Nico Schottelius 2014-07-28 18:04:12 +02:00
commit 698be8e5b6

View file

@ -46,13 +46,13 @@ tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX)
if [ -f "$file" ]; then
cp -p "$file" "\$tmpfile"
fi
awk -v prefix="^$prefix\\\$" -v suffix="^$suffix\\\$" '
awk -v prefix="^$prefix\$" -v suffix="^$suffix\$" '
{
if (index(\$0,prefix)) {
if (match(\$0,prefix)) {
triggered=1
}
if (triggered) {
if (index(\$0,suffix)) {
if (match(\$0,suffix)) {
triggered=0
}
} else {