summaryrefslogtreecommitdiff
path: root/scripts/checkopts.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-25 10:40:04 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-25 10:40:04 +0200
commitd5035f3a2ec6265940c11c355fa6d7dca5a30c03 (patch)
treefa10055aeb252a64d9a97a80b2cd4aa861c79f9a /scripts/checkopts.pl
parent7920f39e9bee5ee9de51f3f4529be2cf15f1a1b0 (diff)
downloadfeh-d5035f3a2ec6265940c11c355fa6d7dca5a30c03.zip
Update checkopts.pl for new --help file
Diffstat (limited to 'scripts/checkopts.pl')
-rwxr-xr-xscripts/checkopts.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/checkopts.pl b/scripts/checkopts.pl
index bd7cd6e..2c64415 100755
--- a/scripts/checkopts.pl
+++ b/scripts/checkopts.pl
@@ -12,12 +12,17 @@ while (my $line = <$c_fh>) {
if ($line =~ /\{"(?<long>[\w-]+)",.*,\s*(?:'(?<short>.)'|(?<short>\d+))\}/o) {
push(@{$options->{$+{long}}}, ['source', $+{short}]);
}
- elsif ($line =~ /" (?:\-(?<short>.), |\s*)--(?<long>[\w-]+) /) {
+}
+close($c_fh);
+
+open(my $h_fh, '<', 'src/help.raw') or die("Can't read help.raw: $!");
+while (my $line = <$h_fh>) {
+
+ if ($line =~ /^ (?:\-(?<short>.), |\s*)--(?<long>[\w-]+) /) {
push(@{$options->{$+{long}}}, ['help', $+{short}]);
}
-
}
-close($c_fh);
+close($h_fh);
open(my $man_fh, '<', 'man/feh.1') or die("Can't read feh.1: $!");
while (my $line = <$man_fh>) {