aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-08-05 13:41:00 +0800
committerpeter <peter@FreeBSD.org>1995-08-05 13:41:00 +0800
commita537ca54d50226a1379ec1f97efefe34a4fe1a6c (patch)
treef894c902f8010bfe41966d248b7cf35db24d8faf
parent9a35a30b7c0f36616f0006246ebe4b769f92c9a5 (diff)
downloadfreebsd-ports-gnome-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.tar.gz
freebsd-ports-gnome-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.tar.zst
freebsd-ports-gnome-a537ca54d50226a1379ec1f97efefe34a4fe1a6c.zip
Add modules, cvsedit
-rwxr-xr-xCVSROOT/cvsedit22
1 files changed, 22 insertions, 0 deletions
diff --git a/CVSROOT/cvsedit b/CVSROOT/cvsedit
new file mode 100755
index 000000000000..d854388bc8b2
--- /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