forked from ungleich-public/cdist
__line: support line/regexp containing /
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
97a8793fdd
commit
2b66889105
2 changed files with 10 additions and 0 deletions
|
@ -49,6 +49,10 @@ case "$state_should" in
|
|||
|
||||
[ "$line" ] && regex="^$line\$"
|
||||
|
||||
# Replace all / with \/
|
||||
regex=$(echo "$regex" | sed 's;/;\\/;g')
|
||||
echo $regex >&2
|
||||
|
||||
cat << eof
|
||||
tmp=\$(mktemp)
|
||||
sed '/$regex/d' "$file" > \$tmp && cat "\$tmp" > "$file" && rm -f "\$tmp"
|
||||
|
|
|
@ -7,6 +7,12 @@ Changelog
|
|||
2.3.4:
|
||||
* Core: Add missing bits to support dry run (Steven Armstrong)
|
||||
* Core: Make unit test remote copy more compatible with scp (Steven Armstrong)
|
||||
* New Type: __postfix (Steven Armstrong)
|
||||
* New Type: __postfix_master (Steven Armstrong)
|
||||
* New Type: __postfix_postconf (Steven Armstrong)
|
||||
* New Type: __postfix_postmap (Steven Armstrong)
|
||||
* New Type: __postfix_reload (Steven Armstrong)
|
||||
* Type __line: Ensure regex does not contain /
|
||||
|
||||
|
||||
2.3.3: 2013-09-09
|
||||
|
|
Loading…
Reference in a new issue