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

Side by Side Diff: pkg/front_end/tool/fasta

Issue 3003743002: Move tools to tool folder. (Closed)
Patch Set: Fix two problems that show up elsewhere. Created 3 years, 4 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 unified diff | Download patch
OLDNEW
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 # TODO(ahe): This should be replaced by a Dart script that works on Windows,
7 # Linux, and Mac.
8
6 set -e 9 set -e
7 10
8 REPO_DIR="$(cd ${BASH_SOURCE%/*} && git rev-parse --show-toplevel)" 11 REPO_DIR="$(cd ${BASH_SOURCE%/*} && git rev-parse --show-toplevel)"
9 12
10 DART_VM="${REPO_DIR}/sdk/bin/dart" 13 DART_VM="${REPO_DIR}/sdk/bin/dart"
11 14
12 TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta" 15 TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta"
13 16
14 KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin" 17 KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin"
15 18
16 function stop { 19 function stop {
17 echo "$@" >&2 20 echo "$@" >&2
18 exit 1 21 exit 2
19 } 22 }
20 23
21 export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64} 24 export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
22 25
23 case "${1//_/-}" in 26 case "${1//_/-}" in
24 abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";; 27 abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";;
25 analyzer-compile) SCRIPT="${TOOL_DIR}/analyzer_compile.dart";; 28 analyzer-compile)
29 stop "'$1' isn't supported anymore, please use 'compile' instead."
30 ;;
26 compile) SCRIPT="${TOOL_DIR}/compile.dart";; 31 compile) SCRIPT="${TOOL_DIR}/compile.dart";;
27 compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";; 32 compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";;
28 compile-platform-dartk) 33 compile-platform-dartk)
29 SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart" 34 SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart"
30 if [ "$#" != "2" ]; then 35 if [ "$#" != "2" ]; then
31 stop "Usage: $1 file" 36 stop "Usage: $1 file"
32 fi 37 fi
33 ;; 38 ;;
34 log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";; 39 log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";;
35 logd) SCRIPT="${TOOL_DIR}/log_collector.dart";; 40 logd) SCRIPT="${TOOL_DIR}/log_collector.dart";;
36 outline) SCRIPT="${TOOL_DIR}/outline.dart";; 41 outline) SCRIPT="${TOOL_DIR}/outline.dart";;
37 parser) SCRIPT="${TOOL_DIR}/parser.dart";; 42 parser) SCRIPT="${TOOL_DIR}/parser.dart";;
38 run) SCRIPT="${TOOL_DIR}/run.dart";; 43 run)
44 stop "'$1' isn't supported anymore, please use 'kernel-service' instead."
45 ;;
39 scanner) SCRIPT="${TOOL_DIR}/scanner.dart";; 46 scanner) SCRIPT="${TOOL_DIR}/scanner.dart";;
40 dump-partial) SCRIPT="${TOOL_DIR}/dump_partial.dart";; 47 dump-partial) SCRIPT="${TOOL_DIR}/dump_partial.dart";;
41 dump-ir) 48 dump-ir)
42 SCRIPT="${KERNEL_BIN}/dump.dart" 49 SCRIPT="${KERNEL_BIN}/dump.dart"
43 if [ "$#" = "2" ]; then 50 if [ "$#" = "2" ]; then
44 # Write to stdout if no target is given. 51 # Write to stdout if no target is given.
45 set -- "$@" /dev/fd/1 52 set -- "$@" /dev/fd/1
46 fi 53 fi
47 if [ "$#" != "3" ]; then 54 if [ "$#" != "3" ]; then
48 stop "Usage: $1 dillfile [output]" 55 stop "Usage: $1 dillfile [output]"
(...skipping 14 matching lines...) Expand all
63 ;; 70 ;;
64 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";; 71 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";;
65 *) 72 *)
66 stop "'$1' isn't a valid subcommand." 73 stop "'$1' isn't a valid subcommand."
67 ;; 74 ;;
68 esac 75 esac
69 76
70 shift 77 shift
71 78
72 exec "${DART_VM}" -c "${SCRIPT}" "$@" 79 exec "${DART_VM}" -c "${SCRIPT}" "$@"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698