diff options
author | Tom Feist <shabble@metavore.org> | 2011-04-18 07:36:21 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2011-04-18 07:36:21 +0000 |
commit | b659b7ec8d3875f714af977cdf92844a9e303e21 (patch) | |
tree | 4c666a4593e90ff0aaaff9a5733b6c8b81a02db8 /readme_generator.pl | |
parent | ido-mode: final fixup. Stupidly missing =back in lists. (diff) | |
download | irssi-scripts-b659b7ec8d3875f714af977cdf92844a9e303e21.tar.gz irssi-scripts-b659b7ec8d3875f714af977cdf92844a9e303e21.zip |
readme: fixed generator to not stomp if multiple files in one dir. Doesn't
auto-display though. Maybe need to generate an index? (But where to store it?)
Diffstat (limited to '')
-rw-r--r-- | readme_generator.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/readme_generator.pl b/readme_generator.pl index 5a997e4..dc3b277 100644 --- a/readme_generator.pl +++ b/readme_generator.pl @@ -43,7 +43,14 @@ sub read_input_file { close $rfh; - create_output_file($dir, 'README.md', $parser); + my @other_files = glob($dir . "/*.pl"); + + if (@other_files > 1) { + $filename =~ s/\.pl$//; + create_output_file($dir, "README-$filename.md", $parser); + } else { + create_output_file($dir, "README.md", $parser); + } } sub create_output_file { |