anchor.diff:      revisions[channel] =
           regExp.firstMatch(lines.firstWhere(regExp.hasMatch)).group(1);
     }
  -}
  -
  -Future setHashes(Map revisions, Map hashes) {
  -  List waitOn = [];
  +  return revisions;
  +}
  +
  +Future<Map> getHashes(Map revisions) async {
  +  var hashes = <String, Map>{};
     for (var channel in CHANNELS) {
       hashes[channel] = {};
       for (var file in FILES) {
  -      waitOn.add(getHash256(channel, revisions[channel], file).then((hash) {
  -        hashes[channel][file] = hash;
  -      }));
  +      var hash = await getHash256(channel, revisions[channel], file);
  +      hashes[channel][file] = hash;
       }
     }
  -  return Future.wait(waitOn);
  +  return hashes;
   }
   
   Future writeHomebrewInfo(String channel, String revision) async {
  -  var revisions = {};
  -  var hashes = {};
  -
  -  await setCurrentRevisions(revisions);
  +  var revisions = await getCurrentRevisions();
   
     if (revisions[channel] == revision) {
       print("Channel $channel is already at revision $revision in homebrew.");
       exit(0);
     }
     revisions[channel] = revision;
  -  await setHashes(revisions, hashes);
  +  var hashes = await getHashes(revisions);
     var devVersion = await getVersion('dev', revisions['dev']);
   
     var stableVersion = await getVersion('stable', revisions['stable']);
   
  -  await (new File('$repository/dartium.rb').openWrite()
  -    ..write(DartiumFile(revisions, hashes, devVersion, stableVersion))).close();
  -  await (new File('$repository/dart.rb').openWrite()
  -    ..write(DartFile(revisions, hashes, devVersion, stableVersion))).close();
  -}
  -
  -String DartiumFile(
  -    Map revisions, Map hashes, String devVersion, String stableVersion) {
  -  final urlBase = 'https://storage.googleapis.com/dart-archive/channels';
  -  final dartiumFile = 'dartium/dartium-macos-ia32-release.zip';
  -  final contentShellFile = 'dartium/content_shell-macos-ia32-release.zip';
  -
  -  return '''
  +  await new File('$repository/dartium.rb').writeAsString(
  +      createDartiumFormula(revisions, hashes, devVersion, stableVersion),
  +      flush: true);
  +  await new File('$repository/dart.rb').writeAsString(
  +      createDartFormula(revisions, hashes, devVersion, stableVersion),
  +      flush: true);
  +}
  +
  +String createDartiumFormula(
  +    Map revisions, Map hashes, String devVersion, String stableVersion) => '''
   require 'formula'
   
   class Dartium < Formula
  
positive.code:   }
  }
  
  Future setCurrentRevisions(Map revisions) async {
    var lines = await (new File('$repository/dart.rb')).readAsLines();
  
    for (var channel in CHANNELS) {
  
negative.code: 
  const CHANNELS = const ['dev', 'stable'];
  
  const FILES = const [x64File, ia32File, dartiumFile, contentShellFile];
  
  const urlBase = 'https://storage.googleapis.com/dart-archive/channels';
  const x64File = 'sdk/dartsdk-macos-x64-release.zip';
  const ia32File = 'sdk/dartsdk-macos-ia32-release.zip';
  const dartiumFile = 'dartium/dartium-macos-ia32-release.zip';
  const contentShellFile = 'dartium/content_shell-macos-ia32-release.zip';
  
  Future<String> getHash256(
      String channel, String revision, String download) async {
  