diff options
author | crees <crees@FreeBSD.org> | 2012-09-21 03:25:59 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2012-09-21 03:25:59 +0800 |
commit | 6c16b89466b5f9a79026dc7cc6a5eba5629b22a5 (patch) | |
tree | 5cea44b46a4ce2814bda2ce9aec1a22e26b788e0 /Tools | |
parent | 86cae7eceb3276585a1ea1a3300fb8840fb6e8bb (diff) | |
download | freebsd-ports-gnome-6c16b89466b5f9a79026dc7cc6a5eba5629b22a5.tar.gz freebsd-ports-gnome-6c16b89466b5f9a79026dc7cc6a5eba5629b22a5.tar.zst freebsd-ports-gnome-6c16b89466b5f9a79026dc7cc6a5eba5629b22a5.zip |
bsd.port.mk handles getting the primary category for us
Since Created by: line appears to be popular, get Submitted by: from that
Old-style Makefile headers should no longer be used
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/addport | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Tools/scripts/addport b/Tools/scripts/addport index 9cabca072693..7115344bc6cc 100755 --- a/Tools/scripts/addport +++ b/Tools/scripts/addport @@ -232,9 +232,7 @@ foreach my $thisdir (@dirs) { # Get the category name and make it suitable for use with svn my $category; - $_ = `$make -V CATEGORIES`; - m/([\w-]+)/; - $category = $1; + $category = `$make -V PKGCATEGORY`; chomp $category; if ($interactive) { if (prompt("Port $portname will be put in category $category. OK? " )) { @@ -271,7 +269,8 @@ foreach my $thisdir (@dirs) { open(MAKEFILE, "Makefile") or die("Can't open Makefile for reading: $!"); while(<MAKEFILE>) { chomp; - ($maintainer) = (m/^MAINTAINER=\s+(\w.*)$/) if (/^MAINTAINER=/); + die ("Old style Makefile headers detected") if (/^# (?:[Nn]ew )?[Pp]orts collection [Mm]akefile/); + ($maintainer) = (m/^# Created by:\s+(\w.*)$/) if (/^# Created by/); ($portversion) = (m/^PORTVERSION=\s+(\w.*)$/) if (/^PORTVERSION=/); } close(MAKEFILE); @@ -293,7 +292,7 @@ foreach my $thisdir (@dirs) { } print AUTOFILL $tmp; print AUTOFILL "PR: ports/$autofill\n" if ($autofill != -1); - print AUTOFILL "Submitted by: $maintainer" if ($autofill != -1); + print AUTOFILL "Submitted by: $maintainer" if ($maintainer && $autofill != -1); close(AUTOFILL); print "Okay, a commit log message was automatically generated for you.\n"; print "Now you will have a chance to edit it to make sure it's OK to use.\n"; |