From 859a79923a1e9df7195e1320d66b61ee162f52cc Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 27 Jan 2021 16:47:08 +0000 Subject: Migrate some stuff away from print_format. --- tools/directive | 4 ++-- tools/mkdescriptions | 2 +- tools/mkheaders | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/directive b/tools/directive index 07d4b09e2..c743ed3e6 100755 --- a/tools/directive +++ b/tools/directive @@ -30,7 +30,7 @@ use make::console; use make::directive; if (scalar @ARGV < 2) { - print_format "<|GREEN Usage:|> $0 <<|UNDERLINE FILE|>> [<|UNDERLINE DIRECTIVES...|>]\n", *STDERR; + say STDERR console_format "<|GREEN Usage:|> $0 <<|UNDERLINE FILE|>> [<|UNDERLINE DIRECTIVES...|>]"; exit 1 } @@ -40,7 +40,7 @@ print_error "<|GREEN $file|> does not exist and/or is not a file!" unless -f $fi for my $directive (@ARGV) { my $value = get_directive $file, $directive, ''; if (-t STDOUT) { - print_format "<|GREEN $directive|>: $value\n"; + say console_format "<|GREEN $directive|>: $value"; } else { say $value; } diff --git a/tools/mkdescriptions b/tools/mkdescriptions index bb6f011d8..5145422c0 100755 --- a/tools/mkdescriptions +++ b/tools/mkdescriptions @@ -35,7 +35,7 @@ use make::common; use make::console; unless (scalar @ARGV) { - print_format "<|GREEN Usage:|> $0 <<|UNDERLINE DOCS-SITE|>>\n", *STDERR; + say STDERR console_format "<|GREEN Usage:|> $0 <<|UNDERLINE DOCS-SITE|>>"; exit 1; } diff --git a/tools/mkheaders b/tools/mkheaders index 0ca593584..f7b1247da 100755 --- a/tools/mkheaders +++ b/tools/mkheaders @@ -50,7 +50,7 @@ for my $path (@paths) { next if $path =~ /\/vendor\//; if (system "git ls-files --error-unmatch -- $path 1>/dev/null 2>/dev/null") { - print_format "Skipping <|YELLOW $path|> as it has not been committed.\n" if defined $ENV{MKHEADERS_VERBOSE}; + say STDERR console_format "Skipping <|YELLOW $path|> as it has not been committed." if defined $ENV{MKHEADERS_VERBOSE}; next; } @@ -68,7 +68,7 @@ for my $path (@paths) { close $fh; if (defined $copyright) { - print_format "Updating copyright headers in <|GREEN $path|>.\n" if defined $ENV{MKHEADERS_VERBOSE}; + say console_format "Updating copyright headers in <|GREEN $path|>." if defined $ENV{MKHEADERS_VERBOSE}; my (%author, %authors); my $ignored_args = join ' ', map { "--ignore-rev $_" } @ignored_revisions; for my $line (split /\n+/, `git blame $ignored_args --incremental -w HEAD -- $path`) { @@ -135,7 +135,7 @@ for my $path (@paths) { close $fh; push @updated, $path; } else { - print_format "Skipping <|YELLOW $path|> as it contains no copyright headers.\n" if defined $ENV{MKHEADERS_VERBOSE}; + say STDERR console_format "Skipping <|YELLOW $path|> as it contains no copyright headers." if defined $ENV{MKHEADERS_VERBOSE}; } } -- cgit v1.2.3