OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 # Run pub.dart on the Dart VM. This script assumes the Dart SDK's directory |
| 3 # structure. |
| 4 |
| 5 # Setting BIN_DIR this way is ugly, but is needed to handle the case where |
| 6 # dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work |
| 7 # with this case. |
| 8 CUR_DIR="$(cd "${0%/*}" ; pwd -P)" |
| 9 export DART_SDK="$(cd "${CUR_DIR%/*}" ; pwd -P)" |
| 10 |
| 11 if [ -z "$DART_VERSION" ]; |
| 12 then |
| 13 DART_VERSION="ReleaseIA32" |
| 14 fi |
| 15 |
| 16 if [[ `uname` -eq 'Darwin' ]]; |
| 17 then |
| 18 BIN_DIR="$CUR_DIR"/../../xcodebuild/$DART_VERSION |
| 19 else |
| 20 BIN_DIR="$CUR_DIR"/../../out/$DART_VERSION |
| 21 fi |
| 22 |
| 23 exec "$BIN_DIR"/dart "$DART_SDK"/../utils/pub/pub.dart $@ |
OLD | NEW |