From: Daniel P. Berrangé Date: Wed, 17 Jul 2019 10:39:32 +0000 (+0100) Subject: build: make augeas-gentest.pl write to stdout X-Git-Tag: v5.7.0-rc1~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06334b97f15ef6d2cee212185407e837dbf2ead6;p=thirdparty%2Flibvirt.git build: make augeas-gentest.pl write to stdout The augeas-gentest.pl program merges a config file into a augeas file, saving the output to a new file. It is going to be useful to further process the output file, and it would be easier if this can be done with a pipeline, so change augeas-gentest.pl to write to stdout instead of a file. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- diff --git a/build-aux/augeas-gentest.pl b/build-aux/augeas-gentest.pl index 567fc651f3..faf2fd593e 100755 --- a/build-aux/augeas-gentest.pl +++ b/build-aux/augeas-gentest.pl @@ -20,17 +20,10 @@ use strict; use warnings; -die "syntax: $0 CONFIG TEMPLATE AUGTEST\n" unless @ARGV == 3; +die "syntax: $0 CONFIG TEMPLATE\n" unless @ARGV == 2; my $config = shift @ARGV; my $template = shift @ARGV; -my $augtest = shift @ARGV; - -open AUGTEST, ">", $augtest or die "cannot create $augtest: $!"; - -$SIG{__DIE__} = sub { - unlink $augtest; -}; open CONFIG, "<", $config or die "cannot read $config: $!"; open TEMPLATE, "<", $template or die "cannot read $template: $!"; @@ -39,12 +32,12 @@ my $group = 0; while (