svn commit: r316470 - head/Tools/scripts

Emanuel Haupt ehaupt at FreeBSD.org
Wed Apr 24 19:12:52 UTC 2013


Author: ehaupt
Date: Wed Apr 24 19:12:52 2013
New Revision: 316470
URL: http://svnweb.freebsd.org/changeset/ports/316470

Log:
  Provide an option to not preserve the original file.
  
  Requested by:	eadler

Modified:
  head/Tools/scripts/convert-makefile-header.pl

Modified: head/Tools/scripts/convert-makefile-header.pl
==============================================================================
--- head/Tools/scripts/convert-makefile-header.pl	Wed Apr 24 18:50:57 2013	(r316469)
+++ head/Tools/scripts/convert-makefile-header.pl	Wed Apr 24 19:12:52 2013	(r316470)
@@ -24,6 +24,7 @@ Usage: $bn [OPTION] PORT
                         (make sure the original creator is ok with this)
   -h, --help            this help
   -n, --nowrite         don't change file, just print what would be done
+  -N, --nopreserve      don't preserve original file
 
 _ENOUSAGE
 }
@@ -40,7 +41,6 @@ sub get_nice_people() {
 		'beat',
 		'brooks',
 		'crees',
-		'ehaupt',
 		'eadler',
 		'flo',
 		'flz',
@@ -91,7 +91,7 @@ MAIN: {
 	# get options
 	my $opt={};
 	my $nice_people=get_nice_people();
-	GetOptions($opt, 'help|h', 'rcsonly|r', 'createdby|c', 'nowrite|n');
+	GetOptions($opt, 'help|h', 'rcsonly|r', 'createdby|c', 'nowrite|n', 'nopreserve|N');
 
 	if(defined($opt->{help})) {
 		usage();
@@ -165,7 +165,7 @@ MAIN: {
 
 			if(not defined($opt->{nowrite})) {
 				# move new Makefile
-				`mv $mf $mf.orig`;
+				`mv $mf $mf.orig` if(not defined($opt->{nopreserve}));
 				`mv $mf.tmp_header_rename $mf`;
 				print STDERR "$mf converted.\n";
 			}


More information about the svn-ports-head mailing list