| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library update_homebrew; | 5 library update_homebrew; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 if build.with? 'content-shell' | 180 if build.with? 'content-shell' |
| 181 content_shell_binary = 'Content Shell.app/Contents/MacOS/Content Shell' | 181 content_shell_binary = 'Content Shell.app/Contents/MacOS/Content Shell' |
| 182 prefix.install resource('content_shell') | 182 prefix.install resource('content_shell') |
| 183 (bin+"content_shell").write shim_script content_shell_binary | 183 (bin+"content_shell").write shim_script content_shell_binary |
| 184 end | 184 end |
| 185 end | 185 end |
| 186 | 186 |
| 187 def shim_script target | 187 def shim_script target |
| 188 <<-EOS.undent | 188 <<-EOS.undent |
| 189 #!/bin/bash | 189 #!/usr/bin/env bash |
| 190 exec "#{prefix}/#{target}" "\$@" | 190 exec "#{prefix}/#{target}" "\$@" |
| 191 EOS | 191 EOS |
| 192 end | 192 end |
| 193 | 193 |
| 194 def caveats; <<-EOS.undent | 194 def caveats; <<-EOS.undent |
| 195 Please note the path to the Dart SDK: | 195 Please note the path to the Dart SDK: |
| 196 #{opt_libexec} | 196 #{opt_libexec} |
| 197 | 197 |
| 198 --with-dartium: | 198 --with-dartium: |
| 199 To use with IntelliJ, set the Dartium execute home to: | 199 To use with IntelliJ, set the Dartium execute home to: |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 await runGit(['push']); | 261 await runGit(['push']); |
| 262 } finally { | 262 } finally { |
| 263 await tempDir.delete(recursive: true); | 263 await tempDir.delete(recursive: true); |
| 264 } | 264 } |
| 265 }, onError: (error, chain) { | 265 }, onError: (error, chain) { |
| 266 print(error); | 266 print(error); |
| 267 print(chain.terse); | 267 print(chain.terse); |
| 268 }); | 268 }); |
| 269 } | 269 } |
| OLD | NEW |