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 6969 TIME=" "
7070fi
7171
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+
7280mkdir -p " $logdir "
7381
7482# 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
9098 echo " [$logname ] error installing, exit status $status . End of log file:"
9199 tail -n 120 " $logfile " | sed " /Please email sage-devel/,$ d;s;^; [$logname ] ;" >&2
92100 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 ) ) )."
95101 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
97108 fi
98109 exit $status
99110else
102113 # run, not the logging.
103114
104115 ( 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;
107117 exit $status ) | \
108118 ( 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 )
109119
You can’t perform that action at this time.
0 commit comments