termcol: numeric module version requirements
[sheet.git] / tools / mktermcol-xcolor
index f731e5a7048a248eea697134402e7fb0d9ff3036..615bff28676e79e2b8e4ab3cb9a64c2f5959f1fd 100755 (executable)
@@ -1,14 +1,17 @@
 #!/usr/bin/env perl
 use 5.010;
 
-use Shiar_Sheet::Colour '1.05';
+use Shiar_Sheet::Colour 1.05;
 
 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);