diff options
author | Sadie Powell <sadie@witchery.services> | 2021-01-27 16:47:08 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-01-27 16:47:08 +0000 |
commit | 859a79923a1e9df7195e1320d66b61ee162f52cc (patch) | |
tree | 691a9d5cb9aea1e587c130888b389398843b7b45 /make | |
parent | f6b861f12d070ba931d829505bfd3229653f5df2 (diff) |
Migrate some stuff away from print_format.
Diffstat (limited to 'make')
-rw-r--r-- | make/common.pm | 2 | ||||
-rw-r--r-- | make/console.pm | 12 | ||||
-rwxr-xr-x | make/unit-cc.pl | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/make/common.pm b/make/common.pm index 38b77e215..519e7fba8 100644 --- a/make/common.pm +++ b/make/common.pm @@ -45,7 +45,7 @@ sub create_directory($$) { } sub execute(@) { - print_format "<|BOLD \$|> @_\n"; + say console_format "<|BOLD \$|> @_"; return system @_; } diff --git a/make/console.pm b/make/console.pm index 278c97d0f..50df77ea5 100644 --- a/make/console.pm +++ b/make/console.pm @@ -76,17 +76,17 @@ sub print_format($;$) { } sub print_error { - print_format "<|RED Error:|> ", *STDERR; + print STDERR console_format "<|RED Error:|> "; for my $line (@_) { - print_format "$line\n", *STDERR; + say STDERR console_format $line; } exit 1; } sub print_warning { - print_format "<|YELLOW Warning:|> ", *STDERR; + print STDERR console_format "<|YELLOW Warning:|> "; for my $line (@_) { - print_format "$line\n", *STDERR; + print STDERR console_format $line; } } @@ -119,8 +119,8 @@ sub prompt_dir($$$;$) { sub prompt_string($$$) { my ($interactive, $question, $default) = @_; return $default unless $interactive; - print_format "$question\n"; - print_format "[<|GREEN $default|>] => "; + say console_format $question; + say console_format "[<|GREEN $default|>] => "; chomp(my $answer = <STDIN>); say ''; return $answer ? $answer : $default; diff --git a/make/unit-cc.pl b/make/unit-cc.pl index f8991cb67..f555c3812 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -57,9 +57,9 @@ exit 1; sub message($$$) { my ($type, $file, $command) = @_; if ($ENV{INSPIRCD_VERBOSE}) { - print "$command\n"; + say $command; } else { - print_format "\t<|GREEN $type:|>\t\t$file\n"; + say console_format "\t<|GREEN $type:|>\t\t$file"; } } |