summaryrefslogtreecommitdiffstats
path: root/CVSROOT
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-08-05 05:41:00 +0000
committerpeter <peter@FreeBSD.org>1995-08-05 05:41:00 +0000
commita537ca54d50226a1379ec1f97efefe34a4fe1a6c (patch)
treef894c902f8010bfe41966d248b7cf35db24d8faf /CVSROOT
parent9a35a30b7c0f36616f0006246ebe4b769f92c9a5 (diff)
downloadFreeBSD-ports-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.zip
FreeBSD-ports-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.tar.gz
Add modules, cvsedit
Diffstat (limited to 'CVSROOT')
-rwxr-xr-xCVSROOT/cvsedit22
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
OpenPOWER on IntegriCloud