Index: compiler/scripts/darta.sh |
diff --git a/compiler/scripts/dartc.sh b/compiler/scripts/darta.sh |
similarity index 60% |
rename from compiler/scripts/dartc.sh |
rename to compiler/scripts/darta.sh |
index ce5458e5daa1b4e615620cc15dc2274067cb3ab7..fde033e62ed187a1ddd8680011151c7452c06edd 100755 |
--- a/compiler/scripts/dartc.sh |
+++ b/compiler/scripts/darta.sh |
@@ -6,8 +6,15 @@ |
set -e |
SCRIPT_DIR=$(dirname $0) |
-DARTC_HOME=$(dirname $SCRIPT_DIR) |
-DARTC_LIBS=$DARTC_HOME/lib |
+DARTA_HOME=${SCRIPT_DIR} |
+# Assuming running from dart-sdk/analysis |
+DART_LIBDIR=${SCRIPT_DIR}/.. |
+ |
+# Make sure the libdir looks right. |
+if [ ! -f ${DART_LIBDIR}/core/lib/core/core_runtime.dart -a -d ${DART_LIBDIR}/dart-sdk ] ; then |
+ # for running from out/<arch>/analysis |
+ DART_LIBDIR=${DART_LIBDIR}/dart-sdk |
+fi |
if [ -x /usr/libexec/java_home ]; then |
export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+') |
@@ -23,5 +30,8 @@ if [ "$OS" == "darwin" ] ; then |
EXTRA_JVMARGS+="-Xmx256M -client -d32" |
fi |
-exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \ |
- com.google.dart.compiler.DartCompiler $@ |
+ |
+CLASSPATH="@CLASSPATH@" |
+exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath $CLASSPATH \ |
+ com.google.dart.compiler.DartCompiler --dart-sdk ${DART_LIBDIR} $@ |
+ |