dont fail if result is empty file

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2014-02-22 00:51:54 +01:00
parent 68c1bf6633
commit 2fdff153d6
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX)
if [ -f "$file" ]; then
cp -p "$file" "\$tmpfile"
fi
grep -v $greparg '$regex' '$file' > \$tmpfile
grep -v $greparg '$regex' '$file' > \$tmpfile || true
mv -f "\$tmpfile" "$file"
eof
;;