OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 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 CUR_DIR="$(cd "${BASH_SOURCE%/*}" ; pwd -P)" |
| 9 |
| 10 if [ -z "$DART_CONFIGURATION" ]; then |
| 11 DART_CONFIGURATION="ReleaseIA32" |
| 12 fi |
| 13 |
| 14 DART_ROOT="$(cd "${CUR_DIR}/../.." ; pwd -P)" |
| 15 SDK_DIR="$(cd "${DART_ROOT}/sdk" ; pwd -P)" |
| 16 PKG_ANALYZER="$DART_ROOT/pkg/analyzer_experimental/bin/analyzer.dart" |
| 17 |
| 18 if [[ `uname` == 'Darwin' ]]; then |
| 19 BUILD_DIR="$DART_ROOT/xcodebuild/$DART_CONFIGURATION" |
| 20 else |
| 21 BUILD_DIR="$DART_ROOT/out/$DART_CONFIGURATION" |
| 22 fi |
| 23 |
| 24 PACKAGE_ROOT="$BUILD_DIR/packages/" |
| 25 |
| 26 FOUND_SDK=0 |
| 27 for ARG in "$@" |
| 28 do |
| 29 case $ARG in |
| 30 --dart-sdk) |
| 31 FOUND_SDK=1 |
| 32 ;; |
| 33 *) |
| 34 ;; |
| 35 esac |
| 36 done |
| 37 |
| 38 if [ $FOUND_SDK = 0 ]; then |
| 39 exec "$BUILD_DIR/dart" "--package-root=$PACKAGE_ROOT" "${PKG_ANALYZER}" \ |
| 40 --dart-sdk "${SDK_DIR}" "$@" |
| 41 else |
| 42 exec "$BUILD_DIR/dart" "--package-root=$PACKAGE_ROOT" "${PKG_ANALYZER}" "$@" |
| 43 fi |
OLD | NEW |