OLD | NEW |
(Empty) | |
| 1 #!/bin/bash --posix |
| 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. |
| 5 |
| 6 set -e |
| 7 |
| 8 BIN_DIR="$(cd "${BASH_SOURCE%/*}" ; pwd -P)" |
| 9 SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)" |
| 10 DART="$BIN_DIR/dart" |
| 11 PKG_ANALYZER="$BIN_DIR/../packages/analyzer_experimental/bin/analyzer.dart" |
| 12 |
| 13 FOUND_BATCH=0 |
| 14 FOUND_SDK=0 |
| 15 for ARG in "$@" |
| 16 do |
| 17 case $ARG in |
| 18 -batch|--batch) |
| 19 FOUND_BATCH=1 |
| 20 ;; |
| 21 --dart-sdk) |
| 22 FOUND_SDK=1 |
| 23 ;; |
| 24 *) |
| 25 ;; |
| 26 esac |
| 27 done |
| 28 |
| 29 if [ $FOUND_SDK = 0 ] ; then |
| 30 exec "$DART" "${PKG_ANALYZER}" --dart-sdk "${SDK_DIR}" "$@" |
| 31 else |
| 32 exec "$DART" "${PKG_ANALYZER}" "$@" |
| 33 fi |
OLD | NEW |