3 # InspIRCd -- Internet Relay Chat Daemon
5 # Copyright (C) 2020 Sadie Powell <sadie@witchery.services>
7 # This file is part of InspIRCd. InspIRCd is free software: you can
8 # redistribute it and/or modify it under the terms of the GNU General Public
9 # License as published by the Free Software Foundation, version 2.
11 # This program is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 unless (-f 'configure') {
24 print "Error: $0 must be run from the main source directory!\n";
31 use warnings FATAL => qw(all);
33 use File::Basename qw(dirname);
34 use FindBin qw($RealDir);
36 use lib dirname $RealDir;
40 if (scalar @ARGV < 2) {
41 print_format "<|GREEN Usage:|> $0 <<|UNDERLINE FILE|>> [<|UNDERLINE DIRECTIVES...|>]\n", *STDERR;
46 print_error "<|GREEN $file|> does not exist and/or is not a file!" unless -f $file;
48 for my $directive (@ARGV) {
49 my $value = get_directive $file, $directive, '';
51 print_format "<|GREEN $directive|>: $value\n";