Depend on awk rather than python

This allows to run dib-run-parts on systems where python is not
installed, such as Debian docker image. Generally, awk is more likely to
be available than python.

Change-Id: I26d7ad55a56ca4785a779f576e2da50a69400563
This commit is contained in:
Martin André 2015-02-03 16:01:07 +09:00
parent a541863d89
commit ddd80eac8d
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ for target in $(find . -name 'start_*' -printf '%f\n' | env LC_ALL=C sort -n) ;
stop_file=stop_${target##start_}
start_seconds=$(cat $target)
stop_seconds=$(cat $stop_file)
duration=$(python -c "print($stop_seconds - $start_seconds)")
duration=$(echo - | awk "{ print $stop_seconds - $start_seconds }")
LC_NUMERIC=C LC_ALL=C printf "%-40s %10.3f\n" ${target##start_} $duration
done
popd > /dev/null