Index: sdk/bin/dart |
=================================================================== |
--- sdk/bin/dart (revision 0) |
+++ sdk/bin/dart (revision 0) |
@@ -0,0 +1,21 @@ |
+#!/bin/bash |
+# Copyright (c) 2012, 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. |
+ |
+# Setting CUR_DIR this way is ugly, but is needed to handle the case where |
+# sdk/bin has been symlinked to. On MacOS, readlink doesn't work with this case. |
+CUR_DIR="$(cd "${0%/*}" ; pwd -P)" |
Ivan Posva
2012/11/08 19:26:05
Empty line between figuring out the current direct
dgrove
2012/11/09 23:04:30
Done.
|
+if [ -z "$DART_VERSION" ]; |
Ivan Posva
2012/11/08 19:26:05
Unfortunately I have no better suggestion than a e
ahe
2012/11/09 16:37:05
DART_CONFIGURATION?
dgrove
2012/11/09 23:04:30
I went with DART_CONFIGURATION.
|
+then |
+ DART_VERSION="ReleaseIA32" |
+fi |
+ |
+if [[ `uname` -eq 'Darwin' ]]; |
+then |
+ BIN_DIR="$CUR_DIR"/../../xcodebuild/$DART_VERSION |
+else |
+ BIN_DIR="$CUR_DIR"/../../out/$DART_VERSION |
+fi |
+ |
+exec "$BIN_DIR"/dart "$@" |
Property changes on: sdk/bin/dart |
___________________________________________________________________ |
Added: svn:executable |
+ * |