Skip to content

Commit

Permalink
remove update.bat. use update.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Dec 16, 2011
1 parent a4e1c2e commit 237be66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 0 additions & 5 deletions update.bat

This file was deleted.

13 changes: 13 additions & 0 deletions update.pl
@@ -0,0 +1,13 @@
use strict;
use warnings;
use LWP::Simple;
use File::Slurp;

my $lines = read_file('coffee.cc', { binmode => ':raw' });
$lines = substr($lines, 0, index($lines, "// DO NOT EDIT\n")+15);

my $res = get('http://jashkenas.github.com/coffee-script/extras/coffee-script.js');
$lines .= join("\n", map { s/([\\"])/\\$1/g; "\"$_\"" } split(/\n/, $res)) . ";\n";

rename 'coffee.cc', 'coffee.cc.orig';
write_file 'coffee.cc', {binmode => ':raw'}, $lines;

0 comments on commit 237be66

Please sign in to comment.