Skip to content

Commit

Permalink
remove -a, as we now use xref instead of full path
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jan 24, 2025
1 parent c4856ea commit d711382
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions scripts/asciidoc/conf2adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $raw = 0;
$blank = 0;
$print_code = 0;

getopts('a:c:o:t');
getopts('c:o:t');

$script_dir = dirname(__FILE__);
$filename = "$script_dir/links.txt";
Expand Down Expand Up @@ -164,20 +164,6 @@ sub process_file {
if ($links{$key} =~ /^http/) {
$link = "`link:" . $links{$key} . "[" . $key . "]`";

} elsif ($links{$key} =~ /^$opt_a/) {
#
# Link to the *relative* path for the file.
# Note that we're passed "-a foo/doc/raddb",
# and also an output file of "doc/raddb/bar.adoc"
# So we need to strip out the duplicate directories.
#
my $absdir = dirname($opt_a . "/" . $output_file);
$absdir =~ s,doc/raddb/,/,;

my $relative = File::Spec->abs2rel($links{$key}, $absdir);

$link = "link:" . $relative . "[" . $key . "]";

} else {
$link = $links{$key} . "[" . $key . "]";
}
Expand Down Expand Up @@ -242,8 +228,4 @@ sub HELP_MESSAGE {
exit 0;
}

if (!defined $opt_a) {
$opt_a = "";
}

process_file(STDIN, $opt_o);

0 comments on commit d711382

Please sign in to comment.