diff options
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-x | Tools/scripts/addport | 7 |
1 files changed, 6 insertions, 1 deletions
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(<MAKEFILE>) { chomp; ($orig) = (m/^# Whom:\s+(\w.*)$/) if (/^# Whom:/); - $orig =~ s/\@/ at /; ($portversion) = (m/^PORTVERSION=\s+(\w.*)$/) if (/^PORTVERSION=/); } close(MAKEFILE); |