index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-08-23 21:35:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-08-23 21:35:06 +0200 |
commit | 395c60b1ce1c8bc84746ecfefba21d3234b288fa (patch) | |
tree | 7b5ef1ec650e6948714c358ba8338fcc75a4567f /bin/build-master-status | |
parent | d44c45606f6289889cb0f5c12ab5bed61d65330d (diff) |
-rwxr-xr-x | bin/build-master-status | 38 |
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 | \ |