From 2affbaa36d9170382f88c2893797da0584dc2fef Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Wed, 23 Jun 2021 17:48:28 +0200 Subject: [PATCH 1/3] Fix wrong whitespaces in variable assignement --- dump-objects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump-objects b/dump-objects index bc55380..28df082 100755 --- a/dump-objects +++ b/dump-objects @@ -195,7 +195,7 @@ object_kinds() { # Get all object types for each group for url in "${groups[@]}"; do local san_name - san_name = $(sanitize_name <<< "${url##/}") + san_name=$(sanitize_name <<< "${url##/}") local name="api-${san_name}.json" local fname="${output_dir}/${name}" From a7b9a6dd3d05907c04a31394f8c09d5fdecbecf3 Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Wed, 23 Jun 2021 17:53:40 +0200 Subject: [PATCH 2/3] Fix wrong local assignment when using mapfile --- dump-objects | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dump-objects b/dump-objects index 28df082..abdf66e 100755 --- a/dump-objects +++ b/dump-objects @@ -139,7 +139,8 @@ extract_versioned_apis() { } validate_kinds() { - local -a mapfile -t expected < /usr/local/share/k8s-object-dumper/must-exist + local -a expected + mapfile -t expected < /usr/local/share/k8s-object-dumper/must-exist local missing=() for j in "${expected[@]}"; do local found= @@ -214,7 +215,8 @@ object_kinds() { # # retrievable_kind() { - local -a mapfile -t known_to_fail < /usr/local/share/k8s-object-dumper/known-to-fail + local -a know_to_fail + mapfile -t known_to_fail < /usr/local/share/k8s-object-dumper/known-to-fail for kind in "${known_to_fail[@]}" do From 1f6bd739573693121c67d2da2ea6d8924a3fc938 Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Wed, 23 Jun 2021 18:09:58 +0200 Subject: [PATCH 3/3] Fix printing empty lines --- dump-objects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump-objects b/dump-objects index abdf66e..a49c556 100755 --- a/dump-objects +++ b/dump-objects @@ -428,7 +428,7 @@ for i in "${kinds[@]}"; do (( ++errors )) || true fi - echo >&2 + log >&2 done if ! split_objects ${object_files+"${object_files[@]}"}; then