aboutsummaryrefslogtreecommitdiff
path: root/Tools/scripts
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2011-08-15 21:21:41 +0000
committerSteve Wills <swills@FreeBSD.org>2011-08-15 21:21:41 +0000
commit4a09663ed3b11901ee4d4c526abc3078956cd5d1 (patch)
tree9a3488e566aa956e34d9aa7651f65bb04d644cbf /Tools/scripts
parentde2db0fd487e81650728be93ad7a80c1351c4cc8 (diff)
downloadports-4a09663ed3b11901ee4d4c526abc3078956cd5d1.tar.gz
ports-4a09663ed3b11901ee4d4c526abc3078956cd5d1.zip
- Remove obfuscation of submitter email at request of dougb
- Add check that port is in right directory as I've been bitten by this
Notes
Notes: svn path=/head/; revision=279770
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/addport7
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);