dot/gpg.conf.m4, dot/gpg-agent.conf, Makefile: Adopt GnuPG configuration.
[profile] / firefox / explode-stylus
CommitLineData
53ad55a5
MW
1#! /usr/bin/perl
2
3use autodie;
51dd0821 4use POSIX qw{:errno_h};
53ad55a5
MW
5use JSON;
6
7my ($dir) = @ARGV;
51dd0821 8eval { mkdir $dir; }; die if $@ && $@->errno != EEXIST;
53ad55a5
MW
9
10local $/;
11my $js = decode_json <STDIN>;
12
13for my $e (@$js) {
14 open $fh, ">", "$dir/$e->{name}.css";
15 print $fh "/* -*-css-*- */\n";
16 for my $s ($e->{sections}->@*) {
17 KEY: for my $k (keys %$s) {
18 next KEY if $k eq "code";
19 print $fh "/*@ $k: ", join(", ", $s->{$k}->@*), " */\n";
20 }
fea6c2f1 21 $s->{code} =~ s/\n$//;
53ad55a5
MW
22 print $fh $s->{code}, "\n";
23 print $fh "/*\@END*/\n";
24 }
25 close $fh;
26}