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:
parent
a541863d89
commit
ddd80eac8d
@ -103,7 +103,7 @@ for target in $(find . -name 'start_*' -printf '%f\n' | env LC_ALL=C sort -n) ;
|
|||||||
stop_file=stop_${target##start_}
|
stop_file=stop_${target##start_}
|
||||||
start_seconds=$(cat $target)
|
start_seconds=$(cat $target)
|
||||||
stop_seconds=$(cat $stop_file)
|
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
|
LC_NUMERIC=C LC_ALL=C printf "%-40s %10.3f\n" ${target##start_} $duration
|
||||||
done
|
done
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user