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

Unified Diff: dart/tools/compiler_scripts/dart_analyzer.sh

Issue 21769002: Add tools/compiler_scripts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | dart/tools/compiler_scripts/generate_my_projects.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/compiler_scripts/dart_analyzer.sh
diff --git a/dart/sdk/bin/dartanalyzer b/dart/tools/compiler_scripts/dart_analyzer.sh
old mode 100755
new mode 100644
similarity index 61%
copy from dart/sdk/bin/dartanalyzer
copy to dart/tools/compiler_scripts/dart_analyzer.sh
index cc33e5c549c7582bfbfa40cbcd000bd1ecaa93f7..c07f5bc371474248af9c276e7a143eae49f0ee3b
--- a/dart/sdk/bin/dartanalyzer
+++ b/dart/tools/compiler_scripts/dart_analyzer.sh
@@ -1,5 +1,5 @@
#!/bin/bash --posix
-# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+# 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.
@@ -29,16 +29,16 @@ done
DART_SDK=""
if [ $FOUND_SDK = 0 ] ; then
- if [ -f "$DART_ANALYZER_HOME/lib/core/core.dart" ] ; then
- DART_SDK=(--dart-sdk "$DART_ANALYZER_HOME")
+ 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
- if [ -d "$DART_SDK_HOME" ] ; then
- DART_SDK=(--dart-sdk "$DART_SDK_HOME")
+ DART_SDK_HOME=$(dirname $DART_ANALYZER_HOME)/dart-sdk
+ if [ -d $DART_SDK_HOME ] ; then
+ DART_SDK="--dart-sdk $DART_SDK_HOME"
else
- DART_SDK_HOME=$(dirname "$DART_SDK_HOME")/dart-sdk
- if [ -d "$DART_SDK_HOME" ] ; then
- DART_SDK=(--dart-sdk "$DART_SDK_HOME")
+ 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
@@ -46,12 +46,12 @@ if [ $FOUND_SDK = 0 ] ; then
fi
fi
-if [ -f "$DART_SDK_HOME/util/dartanalyzer/dartanalyzer.jar" ] ; then
- DART_ANALYZER_LIBS=$DART_SDK_HOME/util/dartanalyzer
-elif [ -f "$DART_ANALYZER_HOME/util/dartanalyzer/dartanalyzer.jar" ] ; then
- DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/dartanalyzer
+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 dartanalyzer.jar."
+ echo "Configuration problem. Couldn't find dart_analyzer.jar."
exit 1
fi
@@ -75,5 +75,5 @@ else
fi
fi
-exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -jar \
- "$DART_ANALYZER_LIBS/dartanalyzer.jar" "${DART_SDK[@]}" $@
+exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \
+ com.google.dart.compiler.DartCompiler ${DART_SDK} $@
« no previous file with comments | « no previous file | dart/tools/compiler_scripts/generate_my_projects.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698