<commit_before># Functions for FreeBSD ports / package management


sub list_update_system_commands
{
return ( "pkg_add" );
}

# update_system_install([package], [&in])
# Install a named package, by buiding the port
sub update_system_install
{
my ($update, $in) = @_;
$update ||= $in{'update'};
my (@rv, @newpacks);
my @want = split(/\s+/, $update);
print "<b>",&text('ports_install', "<tt>$update</tt>"),"</b><p>\n";
print "<pre>";
my $err = 0;
foreach my $w (@want) {
	# Find the package dir
	my $v;
	if ($w =~ /^(\S+)\-(\d\S+)$/) {
		$w = $1;
		$v = $2;
		}
	my @pkgs = grep { $_->{'name'} eq $w &&
			  (!$v || $_->{'version'} eq $v) }
			&update_system_search($w);
	if (!@pkgs) {<commit_msg>The pkg_add command isn't really needed for ports<commit_after># Functions for FreeBSD ports / package management

# update_system_install([package], [&in])
# Install a named package, by buiding the port
sub update_system_install
{
my ($update, $in) = @_;
$update ||= $in{'update'};
my (@rv, @newpacks);
my @want = split(/\s+/, $update);
print "<b>",&text('ports_install', "<tt>$update</tt>"),"</b><p>\n";
print "<pre>";
my $err = 0;
foreach my $w (@want) {
	# Find the package dir
	my $v;
	if ($w =~ /^(\S+)\-(\d\S+)$/) {
		$w = $1;
		$v = $2;
		}
	my @pkgs = grep { $_->{'name'} eq $w &&
			  (!$v || $_->{'version'} eq $v) }
			&update_system_search($w);
	if (!@pkgs) {
{'fraction_non_alphanumeric': 0.24707602339181287, 'fraction_numerical': 0.0043859649122807015, 'mean_word_length': 4.07037037037037, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1420234', 'n_tokens_mistral': 573, 'n_tokens_neox': 543, 'n_words': 149}