1#!/bin/bash 2 3ACLOUD_PREBUILT_PROJECT_DIR=$ANDROID_BUILD_TOP/prebuilts/asuite 4ACLOUD_VENDOR_FOLDER=$ANDROID_BUILD_TOP/vendor/google/tools/acloud 5ACLOUD_PRESETUP_FOLDER=$ANDROID_BUILD_TOP/tools/acloud/setup/pre_setup_sh 6GOOGLE_CONFIG=$ACLOUD_PRESETUP_FOLDER/google-acloud.config 7GOOGLE_SETUP=$ACLOUD_PRESETUP_FOLDER/google_acloud_setup.sh 8GREEN='\033[0;32m' 9NC='\033[0m' 10RED='\033[0;31m' 11 12# Go to a project we know exists and grab user git config info from there. 13if [ ! -d $ACLOUD_PREBUILT_PROJECT_DIR ]; then 14 # If this doesn't exist, either it's not a lunch'd env or something weird is 15 # going on. Either way, let's stop now. 16 exit 17fi 18 19# Get the user eMail. 20pushd $ACLOUD_PREBUILT_PROJECT_DIR &> /dev/null 21USER=$(git config --get user.email) 22popd &> /dev/null 23 24if [[ $USER == *@google.com ]]; then 25 echo "It looks like you're a googler running acloud setup." 26 echo -e "Take a look at ${GREEN}go/acloud-googler-setup${NC} first" 27 echo "before continuing to enable a streamlined setup experience." 28 echo -n "Press [enter] to continue" 29 # Display disclaimer to googlers if it doesn't look like their env will 30 # enable streamlined setup. 31 if [ ! -d $ACLOUD_VENDOR_FOLDER ] && [ ! -f $GOOGLE_CONFIG ] && 32 [ ! -f $GOOGLE_SETUP ]; then 33 echo -e " with the ${RED}manual setup flow${NC}." 34 fi 35 read 36fi 37