Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vladimír Štill
ciutils
Commits
132d6648
Verified
Commit
132d6648
authored
Aug 12, 2020
by
Vladimír Štill
Browse files
makefilter: Wrap command instead of using pipe (to respect exitcode)
parent
0ed180c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
makefilter
View file @
132d6648
...
...
@@ -7,9 +7,10 @@ use v5.16;
$|
++
;
open
(
my
$full
,
"
>
",
"
make-full.log
");
open
(
my
$make
,
"
-|
",
@ARGV
);
my
$cut
=
0
;
while
(
<>
)
{
while
(
<
$make
>
)
{
print
$full
$_
;
s/(error)/colored($1, 'bright_red')/
ei
;
print
if
not
$cut
;
...
...
@@ -18,3 +19,9 @@ while (<>) {
say
"
[[[log cut by makefilter, full log in make-full.log]]]
";
}
}
if
(
not
close
(
$make
))
{
my
$exit
=
$?
>>
8
;
my
$sig
=
$?
&
0xff
;
die
"
Error closing handle to make: $!
"
if
$!
!=
0
;
exit
$exit
+
$sig
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment