Revision: 317 http://trac.macosforge.org/projects/darwinbuild/changeset/317 Author: kevin Date: 2006-10-04 02:02:39 -0700 (Wed, 04 Oct 2006) Log Message: ----------- - only do timing if /bin/date is present in the BuildRoot Modified Paths: -------------- trunk/darwinbuild/darwinbuild Modified: trunk/darwinbuild/darwinbuild =================================================================== --- trunk/darwinbuild/darwinbuild 2006-01-17 22:39:01 UTC (rev 316) +++ trunk/darwinbuild/darwinbuild 2006-10-04 09:02:39 UTC (rev 317) @@ -722,13 +722,19 @@ cd '$SRCROOT' EOF cat <<-EOF >> $SCRIPT - START_DATE=\$(date "+%s") + if [ -x /bin/date ]; then + START_DATE=\$(date "+%s") + fi $buildtool $action $build_string < /dev/null EXIT_STATUS="\$?" - END_DATE=\$(date "+%s") - ELAPSED_TIME=\$((\$END_DATE - \$START_DATE)) + if [ -x /bin/date ]; then + END_DATE=\$(date "+%s") + ELAPSED_TIME=\$((\$END_DATE - \$START_DATE)) + fi echo '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' - echo " BUILD TIME: \$((\$ELAPSED_TIME / 3600))h \$((\$ELAPSED_TIME / 60))m \$((\$ELAPSED_TIME % 60))s" + if [ -x /bin/date ]; then + echo " BUILD TIME: \$((\$ELAPSED_TIME / 3600))h \$((\$ELAPSED_TIME / 60))m \$((\$ELAPSED_TIME % 60))s" + fi echo "EXIT STATUS: \$EXIT_STATUS" exit \$EXIT_STATUS EOF
participants (1)
-
source_changes@macosforge.org