Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: compiler/scripts/dart_analyzer.sh

Issue 11412237: Fix dart_analyzer finding SDK after core_runtime.dart rename (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiler/scripts/dart_analyzer.bat ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/scripts/dart_analyzer.sh
diff --git a/compiler/scripts/dart_analyzer.sh b/compiler/scripts/dart_analyzer.sh
index 8abaf528d7315a4a662d808406873d9f727d5e90..c07f5bc371474248af9c276e7a143eae49f0ee3b 100755
--- a/compiler/scripts/dart_analyzer.sh
+++ b/compiler/scripts/dart_analyzer.sh
@@ -5,8 +5,11 @@
set -e
-SCRIPT_DIR=$(dirname $0)
-DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR)
+# Setting SCRIPT_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.
+SCRIPT_DIR="$(cd "${0%/*}" ; pwd -P)"
+DART_ANALYZER_HOME="$(cd "${SCRIPT_DIR%/*}" ; pwd -P)"
FOUND_BATCH=0
FOUND_SDK=0
@@ -26,7 +29,7 @@ done
DART_SDK=""
if [ $FOUND_SDK = 0 ] ; then
- if [ -f $DART_ANALYZER_HOME/lib/core/core_runtime.dart ] ; then
+ if [ -f $DART_ANALYZER_HOME/lib/core/core.dart ] ; then
DART_SDK="--dart-sdk $DART_ANALYZER_HOME"
else
DART_SDK_HOME=$(dirname $DART_ANALYZER_HOME)/dart-sdk
« no previous file with comments | « compiler/scripts/dart_analyzer.bat ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698