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

Side by Side Diff: tools/apps/update_homebrew/bin/update_homebrew.dart

Issue 1133383002: homebrew: use exec to run shimmed command (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:io'; 7 import 'dart:io';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:async'; 9 import 'dart:async';
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 resource 'content_shell' do 134 resource 'content_shell' do
135 url '$urlBase/stable/release/${revisions['stable']}/$contentShellFile' 135 url '$urlBase/stable/release/${revisions['stable']}/$contentShellFile'
136 version '$stableVersion' 136 version '$stableVersion'
137 sha256 '${hashes['stable'][contentShellFile]}' 137 sha256 '${hashes['stable'][contentShellFile]}'
138 end 138 end
139 139
140 def shim_script target 140 def shim_script target
141 <<-EOS.undent 141 <<-EOS.undent
142 #!/bin/bash 142 #!/bin/bash
143 "#{prefix}/#{target}" "\$@" 143 exec "#{prefix}/#{target}" "\$@"
144 EOS 144 EOS
145 end 145 end
146 146
147 def install 147 def install
148 dartium_binary = 'Chromium.app/Contents/MacOS/Chromium' 148 dartium_binary = 'Chromium.app/Contents/MacOS/Chromium'
149 prefix.install Dir['*'] 149 prefix.install Dir['*']
150 (bin+"dartium").write shim_script dartium_binary 150 (bin+"dartium").write shim_script dartium_binary
151 151
152 content_shell_binary = 'Content Shell.app/Contents/MacOS/Content Shell' 152 content_shell_binary = 'Content Shell.app/Contents/MacOS/Content Shell'
153 prefix.install resource('content_shell') 153 prefix.install resource('content_shell')
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 repository = tempDir.path; 258 repository = tempDir.path;
259 }) 259 })
260 .then((_) => runGit( 260 .then((_) => runGit(
261 ['clone', 'git@github.com:dart-lang/homebrew-dart.git', '.'])) 261 ['clone', 'git@github.com:dart-lang/homebrew-dart.git', '.']))
262 .then((_) => writeHomebrewInfo(channel, revision)) 262 .then((_) => writeHomebrewInfo(channel, revision))
263 .then((_) => runGit(['commit', '-a', '-m', 263 .then((_) => runGit(['commit', '-a', '-m',
264 'Updated $channel branch to revision $revision'])) 264 'Updated $channel branch to revision $revision']))
265 .then((_) => runGit(['push'])) 265 .then((_) => runGit(['push']))
266 .whenComplete(() => new Directory(repository).delete(recursive: true)); 266 .whenComplete(() => new Directory(repository).delete(recursive: true));
267 } 267 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698