mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
Issue #1859 - Part 4: Update mar file generation scripts for use of xz.
- Update packaging scripts to support both lzma and bzip2 - Update python script to support lzma - Update test scripts to support lzma to be thorough This all requires xz to be available in the path on the build system.
This commit is contained in:
parent
a195efca40
commit
121d56e082
9 changed files with 163 additions and 78 deletions
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
use Getopt::Std;
|
||||
|
||||
my ($MAR, $BZIP2, $archive, @marentries, @marfiles);
|
||||
my ($MAR, $XZ, $BZIP2, $MAR_OLD_FORMAT, $archive, @marentries, @marfiles);
|
||||
|
||||
if (defined($ENV{"MAR"})) {
|
||||
$MAR = $ENV{"MAR"};
|
||||
|
|
@ -22,11 +22,23 @@ else {
|
|||
$MAR = "mar";
|
||||
}
|
||||
|
||||
if (defined($ENV{"BZIP2"})) {
|
||||
$BZIP2 = $ENV{"BZIP2"};
|
||||
if (defined($ENV{"MAR_OLD_FORMAT"})) {
|
||||
$MAR_OLD_FORMAT = 1;
|
||||
if (defined($ENV{"BZIP2"})) {
|
||||
$BZIP2 = $ENV{"BZIP2"};
|
||||
}
|
||||
else {
|
||||
$BZIP2 = "bzip2";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$BZIP2 = "bzip2";
|
||||
$MAR_OLD_FORMAT = 0;
|
||||
if (defined($ENV{"XZ"})) {
|
||||
$XZ = $ENV{"XZ"};
|
||||
}
|
||||
else {
|
||||
$XZ = "xz";
|
||||
}
|
||||
}
|
||||
|
||||
sub print_usage
|
||||
|
|
@ -59,9 +71,17 @@ foreach (@marentries) {
|
|||
my @splits = split(/\t/,$_);
|
||||
my $file = $splits[2];
|
||||
|
||||
system("mv \"$file\" \"$file.bz2\"") == 0 ||
|
||||
die "Couldn't mv \"$file\"";
|
||||
system("\"$BZIP2\" -d \"$file.bz2\"") == 0 ||
|
||||
die "Couldn't decompress \"$file\"";
|
||||
if ($MAR_OLD_FORMAT == 1) {
|
||||
system("mv \"$file\" \"$file.bz2\"") == 0 ||
|
||||
die "Couldn't mv \"$file\"";
|
||||
system("\"$BZIP2\" -d \"$file.bz2\"") == 0 ||
|
||||
die "Couldn't decompress \"$file\"";
|
||||
}
|
||||
else {
|
||||
system("mv \"$file\" \"$file.xz\"") == 0 ||
|
||||
die "Couldn't mv \"$file\"";
|
||||
system("\"$XZ\" -d \"$file.xz\"") == 0 ||
|
||||
die "Couldn't decompress \"$file\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue