From ef754de724fad1bf3a42b6deb3e773c8f9b0b9b9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Mar 2020 16:28:46 +0100 Subject: [PATCH] Bug 24912: Add the ability to convert yaml installer files to SQL queries --- misc/load_yaml.pl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/misc/load_yaml.pl b/misc/load_yaml.pl index b12d88d886..9879b5eb01 100755 --- a/misc/load_yaml.pl +++ b/misc/load_yaml.pl @@ -28,7 +28,7 @@ sub print_usage { print < \$help, 'load' => \$load, + 'convert' => \$convert, 'file|f=s@' => \@files, ) or print_usage, exit 1; -if ($help or not @files or not $load) { +if ($help or not @files or not ($convert or $load)) { print_usage; exit; } @@ -61,3 +63,8 @@ if ( $load ) { say $error if $error; } } +if ( $convert ) { + for my $f ( @files ) { + say $installer->yml2sql($f); + } +} -- 2.20.1