aboutsummaryrefslogtreecommitdiffstats
path: root/readme_generator.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-04-18 07:36:21 +0000
committerTom Feist <shabble@metavore.org>2011-04-18 07:36:21 +0000
commitb659b7ec8d3875f714af977cdf92844a9e303e21 (patch)
tree4c666a4593e90ff0aaaff9a5733b6c8b81a02db8 /readme_generator.pl
parentido-mode: final fixup. Stupidly missing =back in lists. (diff)
downloadirssi-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.pl9
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 {