summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-08-23 21:35:06 +0200
committerErich Eckner <git@eckner.net>2017-08-23 21:35:06 +0200
commit395c60b1ce1c8bc84746ecfefba21d3234b288fa (patch)
tree7b5ef1ec650e6948714c358ba8338fcc75a4567f /bin/build-master-status
parentd44c45606f6289889cb0f5c12ab5bed61d65330d (diff)
downloadbuilder-395c60b1ce1c8bc84746ecfefba21d3234b288fa.tar.xz
silence a lot shellcheck warnings
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status38
1 files changed, 16 insertions, 22 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index 90469f2..147b325 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -80,8 +80,7 @@ pending_packages=$(
next_tasks=$(
(
grep -vxF 'break_loops' "${work_dir}/build-list"
- ls "${work_dir}/package-states" | \
- grep '\.broken$' | \
+ find "${work_dir}/package-states" -maxdepth 1 -name '*.broken' -printf '%f\n' | \
sed '
s|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+$| \1 \2 \3|
p
@@ -113,8 +112,7 @@ testing=$(
grep -c '\.pkg\.tar\.xz$'
)
(
- ls "${work_dir}/package-states/" | \
- grep '\.broken$' | \
+ find "${work_dir}/package-states/" -maxdepth 1 -name '*.broken' -printf '%f\n' | \
sed 's|\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\.[^.]\+$| \1 \2 \3|' | \
while read -r pkg rev mod_rev repo; do
if [ -z "$(find_dependencies_on_build_list "${pkg}" "${rev}" "${mod_rev}" "${repo}")" ]; then
@@ -122,13 +120,11 @@ testing=$(
fi
done
(
- ls "${work_dir}/build-list.loops" | \
- grep '^loop_[0-9]\+$' | \
- sed "s|^|${work_dir}/build-list.loops/|" | \
+ find "${work_dir}/build-list.loops" -maxdepth 1 | \
+ grep '/loop_[0-9]\+$' | \
xargs -r cat | \
sort -u
- ls "${work_dir}/package-states/" | \
- grep '\.broken$' | \
+ find "${work_dir}/package-states/" -maxdepth 1 -name '*.broken' -printf '%f\n' | \
sed 's|\(\.[^.]\+\)\{4\}||' | \
sort -u
) | \
@@ -142,21 +138,20 @@ broken=$(
"${tmp_dir}/broken-packages-names"
)
blocked=$(
- ls "${work_dir}/package-states/" | \
- grep -c '\.blocked$'
-) || true
+ find "${work_dir}/package-states/" -maxdepth 1 -name '*.blocked' | \
+ wc -l
+)
locked=$(
- ls "${work_dir}/package-states/" | \
- grep -c '\.locked$'
-) || true
+ find "${work_dir}/package-states/" -maxdepth 1 -name '*.locked' | \
+ wc -l
+)
loops=$(
- ls "${work_dir}/build-list.loops" | \
- grep -c '^loop_[0-9]\+$'
+ find "${work_dir}/build-list.loops" -maxdepth 1 | \
+ grep -c '/loop_[0-9]\+$'
) || true
looped_packages=$(
- ls "${work_dir}/build-list.loops" | \
- grep '^loop_[0-9]\+$' | \
- sed "s|^|${work_dir}/build-list.loops/|" | \
+ find "${work_dir}/build-list.loops" -maxdepth 1 | \
+ grep '/loop_[0-9]\+$' | \
xargs -r cat | \
sort -u | \
wc -l
@@ -245,8 +240,7 @@ if ${web}; then
'dependent' \
'blocked'
printf '</tr>\n'
- ls "${work_dir}/package-states" | \
- grep '\.broken$' | \
+ find "${work_dir}/package-states" -maxdepth 1 -name '*.broken' -printf '%f\n' | \
sed 's|\.broken$||' | \
sed 's|^\(\(.\+\)\.\([^.]\+\)\.\([^.]\+\)\.\([^.]\+\)\)$|\1 \2 \3 \4 \5|' | \
sort -k1,1 | \