Changeset View
Changeset View
Standalone View
Standalone View
Tools/scripts/addport
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
# check the port doesn't exist already | # check the port doesn't exist already | ||||
if ($checkexist) { | if ($checkexist) { | ||||
my $found = 0; | my $found = 0; | ||||
print ">> Fetching INDEX to scan for duplicates...\n"; | print ">> Fetching INDEX to scan for duplicates...\n"; | ||||
my $indexfile = "$tmpdir/" . `$make -C $portsdir -V INDEXFILE`; | my $indexfile = "$tmpdir/" . `$make -C $portsdir -V INDEXFILE`; | ||||
system("$make -C /usr/ports INDEXDIR=$tmpdir fetchindex") && errx(1, "Could not fetch INDEX file."); | system("$make -C $portsdir INDEXDIR=$tmpdir fetchindex") && errx(1, "Could not fetch INDEX file."); | ||||
my @namepart; | my @namepart; | ||||
foreach (split(/\,/, $dir)) { | foreach (split(/\,/, $dir)) { | ||||
s/^.*\///; | s/^.*\///; | ||||
foreach (split(/[-_]/)) { | foreach (split(/[-_]/)) { | ||||
next if length () <=2 or /^rubygem$/; | next if length () <=2 or /^rubygem$/; | ||||
push(@namepart, $_); | push(@namepart, $_); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 434 Lines • Show Last 20 Lines |