From: Mischa POSLAWSKY Date: Sun, 30 Oct 2016 15:59:45 +0000 (+0100) Subject: termcol: configurable xcolors input location X-Git-Tag: v1.9~27 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/6d6acaf88addddc7bc7477ccbf3a70804ffa4e9f termcol: configurable xcolors input location Checkout at data/xcolors defined in makefile but no longer hardcoded in parser tool. --- diff --git a/Makefile b/Makefile index 1750fd0..3489370 100644 --- a/Makefile +++ b/Makefile @@ -37,8 +37,8 @@ unicode-char.inc.pl: tools/mkcharinfo data/digraphs-rfc.inc.pl data/digraphs-shi ttfsupport/%.inc.pl: tools/mkttfinfo data/font/%.ttf $< $(word 2,$^) $@ || true -termcol-xcolor.inc.pl: tools/mktermcol-xcolor - $< >$@ +termcol-xcolor.inc.pl: tools/mktermcol-xcolor data/xcolors/themes + $< $(word 2,$^)/* >$@ .SECONDARY: data/font/%.ttf: diff --git a/tools/mktermcol-xcolor b/tools/mktermcol-xcolor index f731e5a..112dd83 100755 --- a/tools/mktermcol-xcolor +++ b/tools/mktermcol-xcolor @@ -7,8 +7,11 @@ say 'use strict;'; say '+{'; my @names; -for my $path (glob 'data/xcolors/themes/*') { - open my $theme, '<', $path; +for my $path (@ARGV) { + open my $theme, '<', $path or do { + warn "could not open $path: $!\n"; + next; + }; (my $name = $path) =~ s{.*/}{}; # basename my (%pal, @pal);