accept_android_sdk_licenses.sh 635 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1 2 3 4 5
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

6 7
set -e

8 9 10
# This script is only meant to be run by the Cirrus CI system, not locally.
# It must be run from the root of the Flutter repo.

11 12 13 14
function error() {
  echo "$@" 1>&2
}

15
function accept_android_licenses() {
16
  yes "y" | flutter doctor --android-licenses > /dev/null 2>&1
17 18 19 20 21
}

echo "Flutter SDK directory is: $PWD"

# Accept licenses.
22 23
echo "Accepting Android licenses."
accept_android_licenses || (error "Accepting Android licenses failed." && false)