File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 69
69
TIME=" "
70
70
fi
71
71
72
+ report_time ()
73
+ {
74
+ if grep -q ' real [1-9][0-9]' $timefile 2> /dev/null; then
75
+ # at least 10 seconds
76
+ echo $( echo $( cat $timefile ) ) ;
77
+ fi ;
78
+ }
79
+
72
80
mkdir -p " $logdir "
73
81
74
82
# Do all logging of child processes with V=1 to ensure that no
@@ -90,10 +98,13 @@ if [ -n "$SAGE_SILENT_BUILD" -a ${use_prefix} = true ]; then
90
98
echo " [$logname ] error installing, exit status $status . End of log file:"
91
99
tail -n 120 " $logfile " | sed " /Please email sage-devel/,$ d;s;^; [$logname ] ;" >&2
92
100
echo " [$logname ] Full log file: $logfile "
93
- elif grep -q ' real [1-9][0-9]' $timefile 2> /dev/null; then # at least 10 seconds
94
- echo " [$logname ] successfully installed ($( echo $( cat $timefile ) ) )."
95
101
else
96
- echo " [$logname ] successfully installed."
102
+ time=$( report_time)
103
+ if [ -n " $time " ]; then
104
+ echo " [$logname ] successfully installed ($time )."
105
+ else
106
+ echo " [$logname ] successfully installed."
107
+ fi
97
108
fi
98
109
exit $status
99
110
else
102
113
# run, not the logging.
103
114
104
115
( exec 2>&1 ;
105
- $TIME sh -c " $cmd " ; status=$? ;
106
- if grep -q ' real [1-9][0-9]' $timefile 2> /dev/null; then echo $( echo $( cat $timefile ) ) ; fi ;
116
+ $TIME sh -c " $cmd " ; status=$? ; report_time;
107
117
exit $status ) | \
108
118
( trap ' ' SIGINT; if [ -n " $GITHUB_ACTIONS " -a -n " $prefix " ]; then echo " ::group::${logname} " ; fi ; tee -a " $logfile " | $SED ; if [ -n " $GITHUB_ACTIONS " -a -n " $prefix " ]; then echo " ::endgroup::" ; fi )
109
119
You can’t perform that action at this time.
0 commit comments