diff options
author | peter <peter@FreeBSD.org> | 1995-08-05 05:41:00 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-08-05 05:41:00 +0000 |
commit | a537ca54d50226a1379ec1f97efefe34a4fe1a6c (patch) | |
tree | f894c902f8010bfe41966d248b7cf35db24d8faf /CVSROOT | |
parent | 9a35a30b7c0f36616f0006246ebe4b769f92c9a5 (diff) | |
download | FreeBSD-ports-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.zip FreeBSD-ports-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.tar.gz |
Add modules, cvsedit
Diffstat (limited to 'CVSROOT')
-rwxr-xr-x | CVSROOT/cvsedit | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/CVSROOT/cvsedit b/CVSROOT/cvsedit new file mode 100755 index 0000000..d854388 --- /dev/null +++ b/CVSROOT/cvsedit @@ -0,0 +1,22 @@ +#! /bin/sh +# CVS only passes one argument here.. the filename in /tmp... +ARG="$1" + +# same rules as CVS +ED="vi" +{ test -n "$EDITOR"; } && ED="$EDITOR" +{ test -n "$CVSEDITOR"; } && ED="$CVSEDITOR" + +$EDITOR "$ARG" +EDSTATUS=$? + +# In-place edit the result of the user's edit on the file. +/usr/bin/perl -i -e ' +while(<>) { + # Delete the following lines if they only have whitespace after them. + print unless /^Reviewed by:[\s]*$/ || + /^Submitted by:[\s]*$/ || + /^Obtained from:[\s]*$/; +}' "$ARG" + +exit $EDSTATUS |