Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
tor-browser-build
Commits
340d124d
Commit
340d124d
authored
Aug 19, 2020
by
Matthew Finkel
Browse files
Bug 40045: Fix complete .mar file creation for dmg2mar
parent
3a845c42
Changes
2
Hide whitespace changes
Inline
Side-by-side
projects/release/dmg2mar
View file @
340d124d
#!/bin/bash
#!/bin/bash
[
% c
(
"var/set_default_env"
)
-%]
[
% c
(
"var/set_default_env"
)
-%]
cd
[
% shell_quote
(
path
(
dest_dir
))
%]/[% c
(
"var/signed_status"
)
%]/[% c
(
"version"
)
%]
cd
[
% shell_quote
(
path
(
dest_dir
))
%]/[% c
(
"var/signed_status"
)
%]/[% c
(
"version"
)
%]
[
% shell_quote
(
c
(
"basedir"
))
%]/tools/dmg2mar
[
% shell_quote
(
c
(
"basedir"
))
%]/tools/dmg2mar
[
% c
(
"var/channel"
)
%]
tools/dmg2mar
View file @
340d124d
...
@@ -103,6 +103,7 @@ sub get_dmg_files_from_sha256sums {
...
@@ -103,6 +103,7 @@ sub get_dmg_files_from_sha256sums {
}
}
sub
convert_files
{
sub
convert_files
{
my
(
$channel
)
=
@_
;
my
$pm
=
Parallel::
ForkManager
->
new
(
get_nbprocs
);
my
$pm
=
Parallel::
ForkManager
->
new
(
get_nbprocs
);
$pm
->
run_on_finish
(
sub
{
print
"
Finished
$_
[2]
\n
"
});
$pm
->
run_on_finish
(
sub
{
print
"
Finished
$_
[2]
\n
"
});
foreach
my
$file
(
get_dmg_files_from_sha256sums
)
{
foreach
my
$file
(
get_dmg_files_from_sha256sums
)
{
...
@@ -140,9 +141,13 @@ sub convert_files {
...
@@ -140,9 +141,13 @@ sub convert_files {
find
(
$wanted
,
"
$tmpdir
/
$appname
.app
");
find
(
$wanted
,
"
$tmpdir
/
$appname
.app
");
unlink
$output
;
unlink
$output
;
local
$ENV
{
MOZ_PRODUCT_VERSION
}
=
$file
->
{
version
};
local
$ENV
{
MAR_CHANNEL_ID
}
=
"
torbrowser-torproject-
$channel
";
(
undef
,
$err
,
$success
)
=
capture_exec
('
make_full_update.sh
',
'
-q
',
(
undef
,
$err
,
$success
)
=
capture_exec
('
make_full_update.sh
',
'
-q
',
$output
,
"
$tmpdir
/
$appname
.app
");
$output
,
"
$tmpdir
/
$appname
.app
");
exit_error
"
Error updating
$output
:
$err
"
unless
$success
;
exit_error
"
Error updating
$output
:
$err
"
unless
$success
;
exit_error
"
make_full_update.sh failed.
$output
does not exist.
"
unless
-
f
$output
;
$pm
->
finish
;
$pm
->
finish
;
}
}
$pm
->
wait_all_children
;
$pm
->
wait_all_children
;
...
@@ -164,6 +169,10 @@ sub remove_incremental_mars {
...
@@ -164,6 +169,10 @@ sub remove_incremental_mars {
# Set LC_ALL=C to avoid reproducibility issues when creating mar files
# Set LC_ALL=C to avoid reproducibility issues when creating mar files
$ENV
{
LC_ALL
}
=
'
C
';
$ENV
{
LC_ALL
}
=
'
C
';
exit_error
"
Please specify update channel
"
unless
@ARGV
==
1
;
my
$channel
=
$ARGV
[
0
];
extract_martools
;
extract_martools
;
convert_files
;
convert_files
$channel
;
remove_incremental_mars
;
remove_incremental_mars
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment