From 9159b9577f51f60f13f34506280737be0b4edd97 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 26 Feb 2021 17:25:14 +0300 Subject: Convert bash functions that return arrays to comply with Bash Style Guide --- brep/handler/ci/ci-load.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'brep/handler/ci') diff --git a/brep/handler/ci/ci-load.in b/brep/handler/ci/ci-load.in index f62bb76..cd2b879 100644 --- a/brep/handler/ci/ci-load.in +++ b/brep/handler/ci/ci-load.in @@ -213,28 +213,25 @@ while [ "$more" ]; do manifest_names+=("$n") manifest_values+=("$v") - done # Reduce the first manifest case. # - if [ ${#manifest_names[@]} -eq 0 ]; then + if [[ "${#manifest_names[@]}" -eq 0 ]]; then continue fi # Add or filter out the manifest, if present. # - if [ ${#packages[@]} -ne 0 ]; then - - if [[ -v packages["$name"] ]]; then + if [[ "${#packages[@]}" -ne 0 ]]; then + if [[ -v "packages[$name]" ]]; then packages["$name"]= packages["$name/$version"]= # Clear it either, as may also be present. - elif [[ -v packages["$name/$version"] ]]; then + elif [[ -v "packages[$name/$version]" ]]; then packages["$name/$version"]= else continue # Skip. fi - fi packages_manifest_names+=("${manifest_names[@]}") -- cgit v1.1