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

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

Issue 3003743002: Move tools to tool folder. (Closed)
Patch Set: Created 3 years, 3 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 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"
11 11
12 TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta" 12 TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta"
13 13
14 KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin" 14 KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin"
15 15
16 function stop { 16 function stop {
17 echo "$@" >&2 17 echo "$@" >&2
18 exit 1 18 exit 2
19 } 19 }
20 20
21 export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64} 21 export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
22 22
23 case "${1//_/-}" in 23 case "${1//_/-}" in
24 abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";; 24 abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";;
25 analyzer-compile) SCRIPT="${TOOL_DIR}/analyzer_compile.dart";; 25 analyzer-compile)
26 stop "'$1' isn't supported anymore, please use 'compile' instead."
Siggi Cherem (dart-lang) 2017/08/23 20:17:35 we could also just delete this - not sure anyone i
ahe 2017/08/24 11:52:02 That's very likely. I think I'll remove this and "
27 ;;
26 compile) SCRIPT="${TOOL_DIR}/compile.dart";; 28 compile) SCRIPT="${TOOL_DIR}/compile.dart";;
27 compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";; 29 compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";;
28 compile-platform-dartk) 30 compile-platform-dartk)
29 SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart" 31 SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart"
30 if [ "$#" != "2" ]; then 32 if [ "$#" != "2" ]; then
31 stop "Usage: $1 file" 33 stop "Usage: $1 file"
32 fi 34 fi
33 ;; 35 ;;
34 log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";; 36 log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";;
35 logd) SCRIPT="${TOOL_DIR}/log_collector.dart";; 37 logd) SCRIPT="${TOOL_DIR}/log_collector.dart";;
36 outline) SCRIPT="${TOOL_DIR}/outline.dart";; 38 outline) SCRIPT="${TOOL_DIR}/outline.dart";;
37 parser) SCRIPT="${TOOL_DIR}/parser.dart";; 39 parser) SCRIPT="${TOOL_DIR}/parser.dart";;
38 run) SCRIPT="${TOOL_DIR}/run.dart";; 40 run)
41 stop "'$1' isn't supported anymore, please use 'kernel-service' instead."
42 ;;
39 scanner) SCRIPT="${TOOL_DIR}/scanner.dart";; 43 scanner) SCRIPT="${TOOL_DIR}/scanner.dart";;
40 dump-partial) SCRIPT="${TOOL_DIR}/dump_partial.dart";; 44 dump-partial) SCRIPT="${TOOL_DIR}/dump_partial.dart";;
41 dump-ir) 45 dump-ir)
42 SCRIPT="${KERNEL_BIN}/dump.dart" 46 SCRIPT="${KERNEL_BIN}/dump.dart"
43 if [ "$#" = "2" ]; then 47 if [ "$#" = "2" ]; then
44 # Write to stdout if no target is given. 48 # Write to stdout if no target is given.
45 set -- "$@" /dev/fd/1 49 set -- "$@" /dev/fd/1
46 fi 50 fi
47 if [ "$#" != "3" ]; then 51 if [ "$#" != "3" ]; then
48 stop "Usage: $1 dillfile [output]" 52 stop "Usage: $1 dillfile [output]"
(...skipping 14 matching lines...) Expand all
63 ;; 67 ;;
64 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";; 68 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";;
65 *) 69 *)
66 stop "'$1' isn't a valid subcommand." 70 stop "'$1' isn't a valid subcommand."
67 ;; 71 ;;
68 esac 72 esac
69 73
70 shift 74 shift
71 75
72 exec "${DART_VM}" -c "${SCRIPT}" "$@" 76 exec "${DART_VM}" -c "${SCRIPT}" "$@"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698