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

View file

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