Skip to content

Commit f869a9f

Browse files
committed
Use more straightforward style to check if array's empty
1 parent 4a6dad6 commit f869a9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/greposcope

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mkdir -p "${tmp_dir}"
6565
echo -e "==> Fetching the list of unreproducible packages...\n"
6666
mapfile -t pkg_list < <(rebuildctl -H "${rebuilderd_host}" pkgs ls --status BAD | awk '{print $3}')
6767

68-
if [ ${#pkg_list[@]} -eq 0 ]; then
68+
if ! (( ${#pkg_list[@]} )); then
6969
echo "==> No unreproducible packages found"
7070
exit 0
7171
fi
@@ -79,7 +79,7 @@ done
7979

8080
pkg_list=("${updated_pkg_list[@]}")
8181

82-
if [ ${#pkg_list[@]} -eq 0 ]; then
82+
if ! (( ${#pkg_list[@]} )); then
8383
echo "==> All diffoscope outputs are already downloaded"
8484
else
8585
echo -e "==> Downloading diffoscope outputs of ${#pkg_list[@]} unreproducible packages...\nThis may take some time...\n"

0 commit comments

Comments
 (0)