| #!/bin/bash | 
 | # Copyright 2020 The IREE Authors | 
 | # | 
 | # Licensed under the Apache License v2.0 with LLVM Exceptions. | 
 | # See https://llvm.org/LICENSE.txt for license information. | 
 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | 
 |  | 
 | # Installs GCloud and prompts the user to set up authorization. | 
 |  | 
 | set -x | 
 | set -e | 
 |  | 
 | # Install dependencies. | 
 | URI="deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | 
 | echo $URI | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | 
 | apt-get install -y apt-transport-https ca-certificates gnupg curl | 
 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \ | 
 |   apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - | 
 | apt-get update && apt-get install -y google-cloud-sdk | 
 | apt-get install -y google-cloud-sdk-app-engine-java | 
 |  | 
 | # Setup auth. | 
 | gcloud init | 
 | gcloud auth application-default login --no-launch-browser |