43 |
#warn "# dir $dir"; |
#warn "# dir $dir"; |
44 |
} |
} |
45 |
} |
} |
46 |
|
|
47 |
|
sub svn { |
48 |
|
my $path = shift; |
49 |
|
return if $path =~ m{(_rev|.*\.(push|pull)\.js)$}; |
50 |
|
system "svn add --parents $path"; |
51 |
|
} |
52 |
|
|
53 |
sub write_file { |
sub write_file { |
54 |
my ( $path, $content ) = @_; |
my ( $path, $content ) = @_; |
55 |
$path =~ s{^/+}{}; |
$path =~ s{^/+}{}; |
56 |
create_path $path; |
create_path $path; |
57 |
File::Slurp::write_file $path, $content; |
File::Slurp::write_file $path, $content; |
58 |
print "$path ", -s $path, " bytes created\n"; |
print "$path ", -s $path, " bytes created\n"; |
59 |
|
svn $path; |
60 |
} |
} |
61 |
|
|
62 |
sub write_attachment { |
sub write_attachment { |
65 |
create_path $file; |
create_path $file; |
66 |
$ua->mirror( "$url/$path", $file ); |
$ua->mirror( "$url/$path", $file ); |
67 |
print "detached $file ", -s $file, " bytes\n"; |
print "detached $file ", -s $file, " bytes\n"; |
68 |
|
svn $file; |
69 |
} |
} |
70 |
|
|
71 |
|
|