1 #!/usr/bin/env bash 2 # Copyright 2014 The Flutter Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 6 set -e 7 8 # This script is only meant to be run by the Cirrus CI system, not locally. 9 # It must be run from the root of the Flutter repo. 10 11 function error() { 12 echo "$@" 1>&2 13 } 14 15 function accept_android_licenses() { 16 yes "y" | flutter doctor --android-licenses > /dev/null 2>&1 17 } 18 19 echo "Flutter SDK directory is: $PWD" 20 21 # Accept licenses. 22 echo "Accepting Android licenses." 23 accept_android_licenses || (error "Accepting Android licenses failed." && false)