aboutsummaryrefslogtreecommitdiff
path: root/brep/handler/ci
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-02-26 17:25:14 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-26 19:14:04 +0300
commit9159b9577f51f60f13f34506280737be0b4edd97 (patch)
tree0fd27db56dc9bcc9af2438ca41578ba4a97f4a99 /brep/handler/ci
parentf73c92c8e4f36415901d7016f19b9f7df2648521 (diff)
Convert bash functions that return arrays to comply with Bash Style Guide
Diffstat (limited to 'brep/handler/ci')
-rw-r--r--brep/handler/ci/ci-load.in11
1 files changed, 4 insertions, 7 deletions
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[@]}")