| ... |
... |
@@ -114,34 +114,12 @@ sub convert_files { |
|
114
|
114
|
$file->{filename});
|
|
115
|
115
|
exit_error "Error extracting $file->{filename}: $err" unless $success;
|
|
116
|
116
|
|
|
117
|
|
- # 7z does not currently extract file permissions from the dmg files
|
|
118
|
|
- # so we also extract the old mar file to copy the permissions
|
|
119
|
|
- # https://trac.torproject.org/projects/tor/ticket/20210
|
|
120
|
|
- my $tmpdir_oldmar = File::Temp->newdir();
|
|
121
|
|
- my $oldmar = getcwd . '/' . $output;
|
|
122
|
|
- exit_error "Error extracting $output"
|
|
123
|
|
- unless system('mar', '-C', $tmpdir_oldmar, '-x', $oldmar) == 0;
|
|
124
|
|
- my $appdir = "$tmpdir/$appname/$appname.app";
|
|
125
|
|
- exit_error "Missing directory $appdir" unless -d $appdir;
|
|
126
|
|
- my $wanted = sub {
|
|
127
|
|
- my $file = $File::Find::name;
|
|
128
|
|
- $file =~ s{^$appdir/}{};
|
|
129
|
|
- if (-f "$tmpdir_oldmar/$file") {
|
|
130
|
|
- my (undef, undef, $mode) = stat("$tmpdir_oldmar/$file");
|
|
131
|
|
- chmod $mode, $File::Find::name;
|
|
132
|
|
- return;
|
|
133
|
|
- }
|
|
134
|
|
- chmod 0644, $File::Find::name if -f $File::Find::name;
|
|
135
|
|
- chmod 0755, $File::Find::name if -d $File::Find::name;
|
|
136
|
|
- };
|
|
137
|
|
- find($wanted, $appdir);
|
|
138
|
|
-
|
|
139
|
117
|
unlink $output;
|
|
140
|
118
|
local $ENV{MOZ_PRODUCT_VERSION} = $file->{version};
|
|
141
|
119
|
local $ENV{MAR_CHANNEL_ID} = $mar_channel_id;
|
|
142
|
120
|
local $ENV{TMPDIR} = $tmpdir;
|
|
143
|
121
|
(undef, $err, $success) = capture_exec('make_full_update.sh', '-q',
|
|
144
|
|
- $output, $appdir);
|
|
|
122
|
+ $output, "$tmpdir/$appname/$appname.app");
|
|
145
|
123
|
exit_error "Error updating $output: $err" unless $success;
|
|
146
|
124
|
exit_error "make_full_update.sh failed. $output was not created.\n$err"
|
|
147
|
125
|
unless -f $output;
|