mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 05:53:09 +00:00
Add a little script that converts the templates to JSON
For reasons! We are thinking about ways to improve the template workflow, and this is useful for doing that. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
0a4a787c03
commit
8b28625ea2
15
tojson.pm
Executable file
15
tojson.pm
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/perl
|
||||||
|
|
||||||
|
use JSON;
|
||||||
|
|
||||||
|
my $templates = do './templates';
|
||||||
|
my $updates = do './templates-updates';
|
||||||
|
|
||||||
|
my $tempjson = JSON->new->utf8(1)->pretty(1)->encode($templates);
|
||||||
|
my $updjson = JSON->new->utf8(1)->pretty(1)->encode($updates);
|
||||||
|
|
||||||
|
open(FILE, "> templates.json");
|
||||||
|
print FILE $tempjson;
|
||||||
|
|
||||||
|
open (FILE, "> templates-updates.json");
|
||||||
|
print FILE $updjson;
|
Loading…
Reference in New Issue
Block a user