From 4a09663ed3b11901ee4d4c526abc3078956cd5d1 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Mon, 15 Aug 2011 21:21:41 +0000 Subject: - Remove obfuscation of submitter email at request of dougb - Add check that port is in right directory as I've been bitten by this --- Tools/scripts/addport | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Tools') diff --git a/Tools/scripts/addport b/Tools/scripts/addport index b47383f4b462..4610c951daf8 100755 --- a/Tools/scripts/addport +++ b/Tools/scripts/addport @@ -183,6 +183,8 @@ if ($dir eq "") { # make sure we're in the right place. chdir $currentdir; my @dirs = split(/\,/, $dir); +my $portdir = $dirs[0]; +$portdir =~ s,\/.*,, ; foreach my $i (@dirs) { $i = abs_path($i); } my $portname; my $wrapat; foreach my $thisdir (@dirs) { @@ -218,6 +220,10 @@ foreach my $thisdir (@dirs) { m/([\w-]+)/; $category = $1; chomp $category; + if ($portdir ne $category) { + warnx("Port category $category doesn't match dir $portdir !"); + exit 1; + } if ($interactive) { if (prompt("Port $portname will be put in category $category. OK? " )) { do { @@ -255,7 +261,6 @@ foreach my $thisdir (@dirs) { while() { chomp; ($orig) = (m/^# Whom:\s+(\w.*)$/) if (/^# Whom:/); - $orig =~ s/\@/ at /; ($portversion) = (m/^PORTVERSION=\s+(\w.*)$/) if (/^PORTVERSION=/); } close(MAKEFILE); -- cgit v1.2.3