summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorJameson Rollins <jrollins@finestructure.net>2010-10-29 22:07:53 -0400
committerJameson Rollins <jrollins@finestructure.net>2010-10-30 00:06:59 -0400
commit5b32da0412bf995b162cb42cefc5a5a392bdb009 (patch)
tree312f1e11da5c67e366ad8e5db80b29b6a58cdf04 /src/share
parent8019e159c585f0374bccac08f247830ac84ad2d4 (diff)
catch return for grep in remove_line, for case where grep -v returns nothing (e.g. only line in file is removed)
Diffstat (limited to 'src/share')
-rw-r--r--src/share/common2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/share/common b/src/share/common
index 025c991..1e393c7 100644
--- a/src/share/common
+++ b/src/share/common
@@ -346,7 +346,7 @@ remove_line() {
log debug "removing matching key lines..."
tempfile=$(mktemp "${file}.XXXXXXX") || \
failure "Unable to make temp file '${file}.XXXXXXX'"
- grep -v -x -F "$lines" "$file" >"$tempfile"
+ grep -v -x -F "$lines" "$file" >"$tempfile" || :
mv -f "$tempfile" "$file"
fi
}