summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>2023-02-10 21:49:25 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2023-02-11 22:45:10 +0000
commit30f49b56ba6712fb8fb3dd8febb870a1157e1516 (patch)
treed42040f2cd96001eb0521aa6da42c215ad90a272 /bin
parentbbdbe8ea2ef176ef6f08b30b3c18876c2c4f0c22 (diff)
lo-pack-sources: Split archiver invocation away from tar.
Instead of passing --bzip2 or --xz invoke the compression program via a pipe. This make the replacement of compressor as well its options easier. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Change-Id: Ib69c4bc1996ddd52153b8ac27b653c21e3998a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146105 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lo-pack-sources12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/lo-pack-sources b/bin/lo-pack-sources
index 8c795dc170c5..b4150ab87ad7 100755
--- a/bin/lo-pack-sources
+++ b/bin/lo-pack-sources
@@ -155,11 +155,11 @@ sub generate_sources_version_file($$)
sub generate_tarball($$$)
{
- my ($dir, $tarball, $tar_compress_option) = @_;
+ my ($dir, $tarball, $compressor_option) = @_;
print "Creating $tarball...";
# generate the tarball in the current directory; avoid "./" prefix in the stored paths; show progress
- system ("tar -c $tar_compress_option -f $tarball -C $dir $lo_topdir_name") &&
+ system ("tar -c -C $dir $lo_topdir_name | $compressor_option $tarball") &&
die "Error: releasing failed: $!\n";
print "\n";
}
@@ -274,9 +274,9 @@ sub prepare_module_sources($$$$)
sub pack_module_sources($$$$)
{
- my ($temp_dir, $md5, $tarball, $tar_compress_option) = @_;
+ my ($temp_dir, $md5, $tarball, $compressor_option) = @_;
- generate_tarball($temp_dir, $tarball, $tar_compress_option);
+ generate_tarball($temp_dir, $tarball, $compressor_option);
generate_md5($tarball) if (defined $md5);
}
@@ -285,8 +285,8 @@ sub generate_module_tarball($$$$$$$$)
my ($source_dir, $release_version, $module, $md5, $bzip2, $xz, $lo_topdir_name, $module_tarball_name) = @_;
my $temp_dir = prepare_module_sources($source_dir, $release_version, $module, $lo_topdir_name);
- pack_module_sources($temp_dir, $md5, "$module_tarball_name.tar.bz2", "--bzip2") if (defined $bzip2);
- pack_module_sources($temp_dir, $md5, "$module_tarball_name.tar.xz", "--xz") if (defined $xz);
+ pack_module_sources($temp_dir, $md5, "$module_tarball_name.tar.bz2", "bzip2 -z --best > ") if (defined $bzip2);
+ pack_module_sources($temp_dir, $md5, "$module_tarball_name.tar.xz", "xz -z > ") if (defined $xz);
remove_tempdir($temp_dir);
}