@echo ADOC $^
${Q}mkdir -p $(dir $@)
${Q}perl -pi -e 's/^# ([^ \t])/# $$1/;s/^([ \t]+)# ([^ \t])/$$1# $$2/;s/[ \t]+$$//' $^
- ${Q}./scripts/asciidoc/conf2adoc -a ${top_srcdir}/asciidoc -o $@ < $^
+ ${Q}./scripts/asciidoc/conf2adoc -t -a ${top_srcdir}/asciidoc -o $@ < $^
README_MODULES := $(wildcard src/modules/rlm_*/README.md)
doc/raddb/mods-available/all_modules.adoc: $(README_MODULES)
$blank = 0;
$print_code = 0;
-getopts('a:c:o:');
+getopts('a:c:o:t');
$script_dir = dirname(__FILE__);
$filename = "$script_dir/links.txt";
+
+$opt_c = 0 if (defined $opt_t) ;
+
$print_code = $opt_c;
%links = {};
sub process_file {
my $input = shift;
my $output_file = shift;
+ my @code = ();
if (!defined $output_file) {
$output = STDOUT;
$line =~ s,RFC (\d+),https://tools.ietf.org/html/rfc${1}\[RFC $1\],g;
}
- next if (!$print_code && $raw && $was_raw);
+ if (!$print_code) {
+ if ($raw && $was_raw) {
+ push @code, $line if ($opt_t);
+ next;
+ }
+ }
#
# And print out the raw text.
# Terminate any trailing "raw" text.
#
print $output "```\n" if ($print_code);
+
+ if ($opt_t) {
+ print $output "== Default Configuration\n\n";
+
+ print $output "```\n";
+
+ foreach $line (@code) {
+ print $output $line;
+ }
+
+ print $output "```\n";
+ }
}
sub HELP_MESSAGE {