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

Unified Diff: compiler/scripts/dart_analyzer.sh

Issue 10540074: The dart_analyzer launch script was a bit tangled up. It needs to be able (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months 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 | « no previous file | 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 e646c1b00b00be60913d2a9956d26f4b5ec918eb..fc3c57e05e8bec11a206106646106071b002f1c1 100755
--- a/compiler/scripts/dart_analyzer.sh
+++ b/compiler/scripts/dart_analyzer.sh
@@ -33,12 +33,24 @@ if [ $FOUND_SDK = 0 ] ; then
if [ -d $DART_SDK_HOME ] ; then
DART_SDK="--dart-sdk $DART_SDK_HOME"
else
- echo "Couldn't find Dart SDK. Specify with --dart-sdk cmdline argument"
+ DART_SDK_HOME=$(dirname $DART_SDK_HOME)/dart-sdk
+ if [ -d $DART_SDK_HOME ] ; then
+ DART_SDK="--dart-sdk $DART_SDK_HOME"
+ else
+ echo "Couldn't find Dart SDK. Specify with --dart-sdk cmdline argument"
+ fi
fi
fi
fi
-DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/analyzer
+if [ -f $DART_SDK_HOME/util/analyzer/dart_analyzer.jar ] ; then
+ DART_ANALYZER_LIBS=$DART_SDK_HOME/util/analyzer
+elif [ -f $DART_ANALYZER_HOME/util/analyzer/dart_analyzer.jar ] ; then
+ DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/analyzer
+else
+ echo "Configuration problem. Couldn't find dart_analyzer.jar."
+ exit 1
+fi
if [ -x /usr/libexec/java_home ]; then
export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698