dart-sdk/sdk/bin/pub
nweiz@google.com 18ef5b5d80 Clean up various ways we find paths in pub.
This makes it so that it's never necessary to pass in DART_SDK.

Review URL: https://codereview.chromium.org//14449004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21914 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 23:55:46 +00:00

13 lines
453 B
Bash
Executable file

#!/bin/bash
# Run pub.dart on the Dart VM. This script assumes the Dart SDK's directory
# structure.
# Setting BIN_DIR this way is ugly, but is needed to handle the case where
# dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
# with this case.
BIN_DIR="$(cd "${0%/*}" ; pwd -P)"
DART_SDK="$(cd "${BIN_DIR%/*}" ; pwd -P)"
exec "$BIN_DIR"/dart --package-root="$DART_SDK"/packages/ \
"$DART_SDK"/lib/_internal/pub/bin/pub.dart $@