diff options
author | crees <crees@FreeBSD.org> | 2012-05-03 02:32:30 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2012-05-03 02:32:30 +0800 |
commit | 553aabb80ff189838c0730d982a2ef5f4b4ffdd2 (patch) | |
tree | 8195c8f75991cd61c3fa37e3645b2c273b53af7c /Tools | |
parent | 45e6c2a04f0e0401714705f6e573a5ff9c2a816d (diff) | |
download | freebsd-ports-gnome-553aabb80ff189838c0730d982a2ef5f4b4ffdd2.tar.gz freebsd-ports-gnome-553aabb80ff189838c0730d982a2ef5f4b4ffdd2.tar.zst freebsd-ports-gnome-553aabb80ff189838c0730d982a2ef5f4b4ffdd2.zip |
Take maintainership-- thanks to vd for his past work on this script
Approved by: vd (maintainer)
- Make the diff output work
- Use cdiff if exists, otherwise stick with $EDITOR
- Stop trying to remove CVSROOT; hasn't been checked out since modules
support was removed by erwin
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/rmport | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Tools/scripts/rmport b/Tools/scripts/rmport index 7e6c5ef7a99b..f531dd1afd2f 100755 --- a/Tools/scripts/rmport +++ b/Tools/scripts/rmport @@ -3,6 +3,7 @@ # rmport - remove port(s) from the FreeBSD Ports Collection. # # Copyright 2006-2007 Vasil Dimov +# Copyright 2012-2012 Chris Rees # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,10 +30,11 @@ # Authors: # Originally written by Vasil Dimov <vd@FreeBSD.org> # Others: +# Chris Rees <crees@FreeBSD.org> # # $FreeBSD$ # -# MAINTAINER= vd@FreeBSD.org +# MAINTAINER= crees@FreeBSD.org # PORTSDIR=${PORTSDIR:-/usr/ports} @@ -44,6 +46,10 @@ SED="sed -i .orig -E" # use ~/.ssh/config to set up the desired username if different than $LOGNAME PCVS=${PCVS:-cvs -d pcvs.freebsd.org:/home/pcvs} +if ! CDIFF=$(which cdiff) ; then + CDIFF=${EDITOR} +fi + log() { echo "==> $*" >&2 @@ -387,7 +393,7 @@ diff() diffout=${codir}/diff - ${PCVS} diff -u ports > ${diffout} 2>&1 || : + ${PCVS} diff -uN ports > ${diffout} 2>&1 || : read -p "hit <enter> to view cvs diff output" dummy @@ -422,7 +428,7 @@ cleanup() rmdir CVS # release cvs directories - ${PCVS} rel -d CVSROOT ports + ${PCVS} rel -d ports cd / rmdir ${codir} @@ -528,10 +534,9 @@ done # the diff afterwards answer=y while [ "${answer}" = "y" ] ; do - diffout=diff + diffout=$(diff) - # EDITOR instead of PAGER because vim has nice syntax highlighting ;-) - ${EDITOR} ${diffout} + ${CDIFF} ${diffout} echo "" >&2 echo "you can now edit files under ${codir}/ by hand" >&2 |