blob: 9d15f6e586369552f8bf6e5866a1f3ac0a3e1eb5 [file] [log] [blame]
#!/usr/bin/env bash
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
PROG_NAME="$BASH_SOURCE"
WRAPPERS_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
DART_ROOT="$(cd "${WRAPPERS_DIR}/../.." ; pwd -P)"
DARTK="$DART_ROOT/pkg/kernel/bin/dartk.dart"
if [[ `uname` == 'Darwin' ]];
then
DART="$DART_ROOT/tools/sdks/mac/dart-sdk/bin/dart"
else
DART="$DART_ROOT/tools/sdks/linux/dart-sdk/bin/dart"
fi
exec "$DART" "$DARTK" "$@"