mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +00:00
Bash script syntax improvements
This commit is contained in:
@@ -115,14 +115,14 @@ if [ ${remote} = true ] ; then
|
||||
IFS=',' read -ra IM <<< "${images}"
|
||||
images=""
|
||||
for i in "${IM[@]}"; do
|
||||
if [[ $(gcloud compute instances list "${instance_prefix}-$i" | grep ${i}) ]]; then
|
||||
if [[ ${hosts} != "" ]]; then
|
||||
if [[ $(gcloud compute instances list "${instance_prefix}-${i}" | grep ${i}) ]]; then
|
||||
if [[ "${hosts}" != "" ]]; then
|
||||
hosts="${hosts},"
|
||||
fi
|
||||
echo "Reusing host ${instance_prefix}-$i"
|
||||
echo "Reusing host ${instance_prefix}-${i}"
|
||||
hosts="${hosts}${instance_prefix}-${i}"
|
||||
else
|
||||
if [[ ${images} != "" ]]; then
|
||||
if [[ "${images}" != "" ]]; then
|
||||
images="${images},"
|
||||
fi
|
||||
images="${images}${i}"
|
||||
|
Reference in New Issue
Block a user