From 6c9ef1ccaca1763d6a9e46c71ed9c67f6139c5bc Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 14 Jun 2017 16:11:08 +0200 Subject: remove bashisms - only "bash arrays" and "bash string substituions" left --- bin/build-master-status | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bin/build-master-status') diff --git a/bin/build-master-status b/bin/build-master-status index 85e65f7..ba1dba3 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -48,9 +48,9 @@ looped_packages="$( printf 'The mirror master contains %d stable packages (vs. ca. %d planned).\n' \ "${stable}" \ - "$[${staging}+${testing}+${pending_packages}]" + "$((${staging}+${testing}+${pending_packages}))" printf 'The build list contains %d tasks (incl. broken: %d, leading to %d packages).\n' \ - "$[${tasks}-${broken}]" \ + "$((${tasks}-${broken}))" \ "${tasks}" \ "${pending_packages}" printf 'There are %d testing and %d staging packages.\n' \ @@ -63,11 +63,17 @@ if [ "${loops}" -ne 0 ]; then "${loops}" \ "${looped_packages}" fi -if [ $[${broken}+${testing}+${staging}] -ne 0 ]; then +if [ $((${broken}+${testing}+${staging})) -ne 0 ]; then printf '%.1f%% of all packages are broken.\n' \ - "$(bc <<< "scale=10; 100*${broken}/(${broken}+${testing}+${staging})")" + "$( + echo "scale=10; 100*${broken}/(${broken}+${testing}+${staging})" | \ + bc + )" fi -if [ $[${testing}+${staging}+${pending_packages}-${broken}] -ne 0 ]; then +if [ $((${testing}+${staging}+${pending_packages}-${broken})) -ne 0 ]; then printf '%.1f%% of the planned work has been done.\n' \ - "$(bc <<< "scale=10; 100*(${testing}+${staging})/(${testing}+${staging}+${pending_packages}-${broken})")" + "$( + echo "scale=10; 100*(${testing}+${staging})/(${testing}+${staging}+${pending_packages}-${broken})" | \ + bc + )" fi -- cgit v1.2.3-54-g00ecf