summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrfc.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/rfc.sh b/rfc.sh
index 2a5e779c1..1ee6d042d 100755
--- a/rfc.sh
+++ b/rfc.sh
@@ -40,7 +40,7 @@ function rebase_changes()
function editor_mode()
{
if [ $(basename "$1") = "git-rebase-todo" ]; then
- sed -i 's/^pick /reword /g' "$1";
+ sed 's/^pick /reword /g' "$1" > $1.new && mv $1.new $1;
return;
fi
@@ -60,7 +60,8 @@ function editor_mode()
continue;
fi
- sed -i "s/^\(Change-Id: .*\)$/\1\nBUG: $bug/g" $1;
+ sed -i "s/^\(Change-Id: .*\)$/\1\nBUG: $bug/g" $1 > $1.new && \
+ mv $i.new $i
return;
done
fi