From ddd80eac8de8e78330c1007c40f5fc067f0229ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Tue, 3 Feb 2015 16:01:07 +0900 Subject: [PATCH] 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 --- bin/dib-run-parts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dib-run-parts b/bin/dib-run-parts index a1ceb86..575e6fd 100755 --- a/bin/dib-run-parts +++ b/bin/dib-run-parts @@ -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