... |
... |
@@ -106,7 +106,11 @@ sub get_dmg_files_from_sha256sums { |
106
|
106
|
sub convert_files {
|
107
|
107
|
my ($channel) = @_;
|
108
|
108
|
my $pm = Parallel::ForkManager->new(get_nbprocs);
|
109
|
|
- $pm->run_on_finish(sub { print "Finished $_[2]\n" });
|
|
109
|
+ $pm->run_on_finish(
|
|
110
|
+ sub {
|
|
111
|
+ exit_error "Failed while running $_[2]" unless $_[1] == 0;
|
|
112
|
+ print "Finished $_[2]\n";
|
|
113
|
+ });
|
110
|
114
|
foreach my $file (get_dmg_files_from_sha256sums) {
|
111
|
115
|
# The 'ja' locale is a special case: it is called 'ja-JP-mac'
|
112
|
116
|
# internally on OSX, but the dmg file still uses 'ja' to avoid
|
... |
... |
@@ -128,9 +132,11 @@ sub convert_files { |
128
|
132
|
my $oldmar = getcwd . '/' . $output;
|
129
|
133
|
exit_error "Error extracting $output"
|
130
|
134
|
unless system('mar', '-C', $tmpdir_oldmar, '-x', $oldmar) == 0;
|
|
135
|
+ my $appdir = "$tmpdir/$appname/$appname.app";
|
|
136
|
+ exit_error "Missing directory $appdir" unless -d $appdir;
|
131
|
137
|
my $wanted = sub {
|
132
|
138
|
my $file = $File::Find::name;
|
133
|
|
- $file =~ s{^$tmpdir/$appname\.app/}{};
|
|
139
|
+ $file =~ s{^$appdir/}{};
|
134
|
140
|
if (-f "$tmpdir_oldmar/$file") {
|
135
|
141
|
my (undef, undef, $mode) = stat("$tmpdir_oldmar/$file");
|
136
|
142
|
chmod $mode, $File::Find::name;
|
... |
... |
@@ -139,14 +145,14 @@ sub convert_files { |
139
|
145
|
chmod 0644, $File::Find::name if -f $File::Find::name;
|
140
|
146
|
chmod 0755, $File::Find::name if -d $File::Find::name;
|
141
|
147
|
};
|
142
|
|
- find($wanted, "$tmpdir/$appname.app");
|
|
148
|
+ find($wanted, $appdir);
|
143
|
149
|
|
144
|
150
|
unlink $output;
|
145
|
151
|
local $ENV{MOZ_PRODUCT_VERSION} = $file->{version};
|
146
|
152
|
local $ENV{MAR_CHANNEL_ID} = "torbrowser-torproject-$channel";
|
147
|
153
|
local $ENV{TMPDIR} = $tmpdir;
|
148
|
154
|
(undef, $err, $success) = capture_exec('make_full_update.sh', '-q',
|
149
|
|
- $output, "$tmpdir/$appname.app");
|
|
155
|
+ $output, $appdir);
|
150
|
156
|
exit_error "Error updating $output: $err" unless $success;
|
151
|
157
|
exit_error "make_full_update.sh failed. $output does not exist."
|
152
|
158
|
unless -f $output;
|