#!/usr/bin/env perl
-
#
# InspIRCd -- Internet Relay Chat Daemon
#
# Copyright (C) 2019 Matt Schatz <genius3000@g3k.solutions>
# Copyright (C) 2019 Anatole Denis <natolumin@rezel.net>
# Copyright (C) 2017 emerson <github@emersonveenstra.net>
-# Copyright (C) 2013-2019 Sadie Powell <sadie@witchery.services>
+# Copyright (C) 2013-2020 Sadie Powell <sadie@witchery.services>
# Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
# Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
# Copyright (C) 2010 Daniel De Graaf <danieldg@inspircd.org>
);
if (scalar(@opt_enableextras) + scalar(@opt_disableextras) > 0) {
- @opt_enableextras = split /,/, join(',', @opt_enableextras);
- @opt_disableextras = split /,/, join(',', @opt_disableextras);
+ @opt_enableextras = split /[, ]+/, join(',', @opt_enableextras);
+ @opt_disableextras = split /[, ]+/, join(',', @opt_disableextras);
enable_extras(@opt_enableextras);
disable_extras(@opt_disableextras);
list_extras;
to specify an unprivileged group to run as.
EOW
if (!prompt_bool $interactive, "Are you sure you want to build as the $group[0] group?", 0) {
+ # PACKAGERS: You do not need to delete this check. Use `--gid $(id -g)` or `--gid 0` instead.
say STDERR "If you are sure you want to build as the $group[0] group pass the --gid $group[2] flag." unless $interactive;
exit 1;
}
to specify an unprivileged user to run as.
EOW
if (!prompt_bool $interactive, "Are you sure you want to build as the $user[0] user?", 0) {
+ # PACKAGERS: You do not need to delete this check. Use `--uid $(id -u)` or `--uid 0` instead.
say STDERR "If you are sure you want to build as the $user[0] user pass the --uid $user[2] flag." unless $interactive;
exit 1;
}
<|GREEN Execution User:|> $config{USER} ($config{UID})
<|GREEN Socket Engine:|> $config{SOCKETENGINE}
-To build with these settings run '<|GREEN make -j${\get_cpu_count} install|>' now.
+To build with these settings run '<|GREEN make -j${\(get_cpu_count() + 1)} install|>' now.
EOM
sub enable_extras (@) {
my (@extras) = @_;
for my $extra (@extras) {
+ $extra = "m_$extra" unless $extra =~ /^m_/;
+ $extra = "$extra.cpp" unless $extra =~ /\.cpp$/;
my $extrapath = "src/modules/extra/$extra";
if (!-e $extrapath) {
print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in src/modules/extra\n";
closedir $dd;
my (@extras) = @_;
EXTRA: for my $extra (@extras) {
+ $extra = "m_$extra" unless $extra =~ /^m_/;
+ $extra = "$extra.cpp" unless $extra =~ /\.cpp$/;
my $extrapath = "src/modules/extra/$extra";
my $source = "src/modules/$extra";
if (!-e $extrapath) {