Skip to content

Commit

Permalink
Fix shellcheck errors to pass the linter
Browse files Browse the repository at this point in the history
The errors fixed mainly relates to SC2068, SC2145 and SC2071 problems.
  • Loading branch information
leo8a authored and Francisco de Borja Aranda Castillejo committed Jun 14, 2022
1 parent 532c76b commit ffbc979
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions deploy-edgecluster/configure_disconnected.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function copy_files() {
dst_folder=${3}

if [[ -z ${src_files} ]]; then
echo "Source files variable empty: ${src_files[@]}"
echo "Source files variable empty: " "${src_files[@]}"
exit 1
fi

Expand All @@ -25,8 +25,8 @@ function copy_files() {
exit 1
fi

echo "Copying source files: ${src_files[@]} to Node ${dst_node}"
${SCP_COMMAND} -i ${RSA_KEY_FILE} ${src_files[@]} core@${dst_node}:${dst_folder}
echo "Copying source files: " "${src_files[@]}" "to Node ${dst_node}"
${SCP_COMMAND} -i ${RSA_KEY_FILE} "${src_files[@]}" core@${dst_node}:${dst_folder}
}

function grab_master_ext_ips() {
Expand Down
8 changes: 4 additions & 4 deletions deploy-metallb/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function copy_files() {
dst_folder=${3}

if [[ -z ${src_files} ]]; then
echo "Source files variable empty: ${src_files[@]}"
echo "Source files variable empty: " "${src_files[@]}"
exit 1
fi

Expand All @@ -206,8 +206,8 @@ function copy_files() {
exit 1
fi

echo "Copying source files: ${src_files[@]} to Node ${dst_node}"
${SCP_COMMAND} -i ${RSA_KEY_FILE} ${src_files[@]} core@${dst_node}:${dst_folder}
echo "Copying source files: " "${src_files[@]}" "to Node ${dst_node}"
${SCP_COMMAND} -i ${RSA_KEY_FILE} "${src_files[@]}" core@${dst_node}:${dst_folder}
}

function check_external_access() {
Expand Down Expand Up @@ -272,7 +272,7 @@ if ! ./verify.sh; then
# Remote working
echo ">> Copying files to the Edge-cluster ${edgecluster}"
${SSH_COMMAND} -i ${RSA_KEY_FILE} core@${EDGE_NODE_IP} "mkdir -p ~/manifests ~/.kube"
for _file in ${files[@]}; do
for _file in "${files[@]}"; do
copy_files "${_file}" "${EDGE_NODE_IP}" "./manifests/"
done
copy_files "./manifests/*.yaml" "${EDGE_NODE_IP}" "./manifests/"
Expand Down
2 changes: 1 addition & 1 deletion hack/deploy-hub-local/lab-dns-external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function checks() {
fi
done

if [[ $fail > 0 ]];then
if [[ $fail -gt 0 ]];then
echo "ERROR: DNS Configuration has issues, check before continue"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion hack/deploy-hub-local/lab-dns-internal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function checks() {
fi
done

if [[ $fail > 0 ]];then
if [[ $fail -gt 0 ]];then
echo "ERROR: DNS Configuration has issues, check before continue"
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions shared-utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function copy_files_common() {
dst_folder=${3}

if [[ -z ${src_files} ]]; then
echo "Source files variable empty: ${src_files[@]}"
echo "Source files variable empty: " "${src_files[@]}"
exit 1
fi

Expand All @@ -216,8 +216,8 @@ function copy_files_common() {
exit 1
fi

echo "Copying source files: ${src_files[@]} to Node ${dst_node}"
${SCP_COMMAND} -i ${RSA_KEY_FILE} ${src_files[@]} core@${dst_node}:${dst_folder}
echo "Copying source files: " "${src_files[@]}" "to Node ${dst_node}"
${SCP_COMMAND} -i ${RSA_KEY_FILE} "${src_files[@]}" core@${dst_node}:${dst_folder}
}

function grab_domain() {
Expand Down

0 comments on commit ffbc979

Please sign in to comment.