Closed GoogleCodeExporter closed 9 years ago
Forgot to add that I pulled this from svn r39.
Original comment by calsci.c...@gmail.com
on 15 Oct 2010 at 3:28
Hi Chris,
The line you mentioned is actually Line 351
351 sed -i '/^--.*--$/, $ d' $COMMENT_FILE
This is to strip anything started from line matches '--.*--$' to the end of
comment file. The error message is about a sed "c" command seems not related
to the line. Anyway I did not try this on Mac OS before so it is possible to
have issues.
I don't have a Mac by hand so cannot debug this right now. If you are
interested, would you please try
1. Compose a file 'comments' with following content (just 2 lines)
blah blah, comments here
--Enter comments above. This line and those below will be ignored--
2. Try the sed command and verify the result, the second line is supposed to be
deleted
sed -i '/^--.*--$/, $ d' comments
cat comments
If you see the same error then this is the point. Try remove the extra space
before '$' and 'd' (I doubt there's compatibility issue here)
sed -i '/^--.*--$/,$d' comments
cat comments
Please let me know the result.
Workaround: use the '-m' option to input comments directly.
Thanks,
Matt
Original comment by matt...@gmail.com
on 16 Oct 2010 at 6:50
This tool is moved to github. This issue is fixed there.
https://github.com/ymattw/coderev/commit/cbd3b419dfb6f6341cef881252e56b644bbf69a
c
The fix is quite easy:
~/ws/coderev $ git diff 70d7 cbd3
diff --git a/coderev.sh b/coderev.sh
index e34891e..a316782 100755
--- a/coderev.sh
+++ b/coderev.sh
@@ -357,7 +357,7 @@ This line and those below will be ignored--"
fi
}
${EDITOR} $COMMENT_FILE
- sed -i '/^--.*--$/, $ d' $COMMENT_FILE
+ sed -i -e '/^--.*--$/, $ d' $COMMENT_FILE
}
CODEDIFF_OPT+=" -F $COMMENT_FILE"
else
Original comment by matt...@gmail.com
on 12 Jan 2013 at 1:46
Original issue reported on code.google.com by
calsci.c...@gmail.com
on 15 Oct 2010 at 3:27