| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 set -e | 6 set -e |
| 7 | 7 |
| 8 REPO_DIR="$(cd ${BASH_SOURCE%/*} && git rev-parse --show-toplevel)" | 8 REPO_DIR="$(cd ${BASH_SOURCE%/*} && git rev-parse --show-toplevel)" |
| 9 | 9 |
| 10 DART_VM="${REPO_DIR}/sdk/bin/dart" | 10 DART_VM="${REPO_DIR}/sdk/bin/dart" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 if [ "$#" != "2" ]; then | 30 if [ "$#" != "2" ]; then |
| 31 stop "Usage: $1 file" | 31 stop "Usage: $1 file" |
| 32 fi | 32 fi |
| 33 ;; | 33 ;; |
| 34 log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";; | 34 log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";; |
| 35 logd) SCRIPT="${TOOL_DIR}/log_collector.dart";; | 35 logd) SCRIPT="${TOOL_DIR}/log_collector.dart";; |
| 36 outline) SCRIPT="${TOOL_DIR}/outline.dart";; | 36 outline) SCRIPT="${TOOL_DIR}/outline.dart";; |
| 37 parser) SCRIPT="${TOOL_DIR}/parser.dart";; | 37 parser) SCRIPT="${TOOL_DIR}/parser.dart";; |
| 38 run) SCRIPT="${TOOL_DIR}/run.dart";; | 38 run) SCRIPT="${TOOL_DIR}/run.dart";; |
| 39 scanner) SCRIPT="${TOOL_DIR}/scanner.dart";; | 39 scanner) SCRIPT="${TOOL_DIR}/scanner.dart";; |
| 40 dump-partial) SCRIPT="${TOOL_DIR}/dump_partial.dart";; |
| 40 dump-ir) | 41 dump-ir) |
| 41 SCRIPT="${KERNEL_BIN}/dump.dart" | 42 SCRIPT="${KERNEL_BIN}/dump.dart" |
| 42 if [ "$#" = "2" ]; then | 43 if [ "$#" = "2" ]; then |
| 43 # Write to stdout if no target is given. | 44 # Write to stdout if no target is given. |
| 44 set -- "$@" /dev/fd/1 | 45 set -- "$@" /dev/fd/1 |
| 45 fi | 46 fi |
| 46 if [ "$#" != "3" ]; then | 47 if [ "$#" != "3" ]; then |
| 47 stop "Usage: $1 dillfile [output]" | 48 stop "Usage: $1 dillfile [output]" |
| 48 fi | 49 fi |
| 49 ;; | 50 ;; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 62 ;; | 63 ;; |
| 63 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";; | 64 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";; |
| 64 *) | 65 *) |
| 65 stop "'$1' isn't a valid subcommand." | 66 stop "'$1' isn't a valid subcommand." |
| 66 ;; | 67 ;; |
| 67 esac | 68 esac |
| 68 | 69 |
| 69 shift | 70 shift |
| 70 | 71 |
| 71 exec "${DART_VM}" -c "${SCRIPT}" "$@" | 72 exec "${DART_VM}" -c "${SCRIPT}" "$@" |
| OLD | NEW |