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

Unified Diff: sdk/bin/analyzer

Issue 12335133: Create "binaries" for calling the new analyzer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
Index: sdk/bin/analyzer
===================================================================
--- sdk/bin/analyzer (revision 0)
+++ sdk/bin/analyzer (revision 0)
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Copyright (c) 2013, 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.
+
+# This file is used to execute the analyzer by running the jar file
+# It is a simple wrapper enabling us to have simpler command lines in
+# the testing infrastructure.
+# This file is copied to the output of the analyzer under bin/ by the
ahe 2013/03/12 14:13:11 Why is that necessary?
ricow1 2013/03/12 15:28:55 It is not
+# build scripts.
+set -e
+
+function follow_links() {
+ while [ -h "$1" ]; do
+ # On Mac OS, readlink -f doesn't work.
+ 1="$(readlink "$1")"
+ done
+ echo "$1"
+}
+
+# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
+PROG_NAME="$(follow_links "$BASH_SOURCE")"
+
+# Handle the case where the binary dir has been symlinked to.
+BIN_DIR="$(follow_links "$(cd "${PROG_NAME%/*}" ; pwd -P)")"
+
+# The jar file is placed one directory up from the bin directory.
+JAR_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)"
+
+JAR_FILE="$JAR_DIR/new_analyzer.jar"
+
+exec java -jar $JAR_FILE
Property changes on: sdk/bin/analyzer
___________________________________________________________________
Added: svn:executable
+ *

Powered by Google App Engine
This is Rietveld 408576698