From fd1a51c00a91edeaa58f460f59664c30b3e19532 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 12 Nov 2016 02:51:47 +0100 Subject: [PATCH] termcol: ignore duplicate xcolor palettes --- tools/mktermcol-xcolor | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/mktermcol-xcolor b/tools/mktermcol-xcolor index 615bff2..596bb56 100755 --- a/tools/mktermcol-xcolor +++ b/tools/mktermcol-xcolor @@ -6,6 +6,7 @@ use Shiar_Sheet::Colour 1.05; say 'use strict;'; say '+{'; my @names; +my %seen; for my $path (@ARGV) { open my $theme, '<', $path or do { @@ -40,6 +41,11 @@ for my $path (@ARGV) { $huesum > 3 or next; # require number of significant hue changes #TODO tweak to include good-pants, exclude cheesecake-* + if ($seen{"@pal"}++) { + warn "ignore duplicate palette $name\n"; + next; + } + say qq("$name" => {); say qq(\ttitle => '$name',); say qq(\tparent => 'cga',); -- 2.30.0