title: syntax error near unexpected token `fi' in bash script
body: <p>I'm facing an issue while cloning a git repo to the spark dataproc cluster in gcp. I'm using a bash script in initialization action for cloning the repo to the master node of the cluster.
  Please find the script and the error message below.</p>
  <pre><code>pip uninstall -y gcsfs
  pip install gcsfs==2021.10.1
  ROLE=$(/usr/share/google/get_metadata_value attributes/dataproc-role)
  if [[ &quot;${ROLE}&quot; == 'Master' ]]; then
    gcloud config set project myproject-1
    gcloud source repos clone timeseries-forecast --project=myproject-1
    cd /timeseries-forecast
    git checkout origin dev-branch
  fi
  
  
  error message:
  /etc/google-dataproc/startup-scripts/dataproc-initialization-script-0: line 9: syntax error near unexpected token `fi'
  /etc/google-dataproc/startup-scripts/dataproc-initialization-script-0: line 9: `fi'
  </code></pre>