Skip to content

Commit

Permalink
Remove LaTeX leftovers from package distro tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Aug 11, 2022
1 parent 0c8bfac commit 105f8bd
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions tools/assemble_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
##
## SPDX-License-Identifier: GPL-2.0-or-later
##
import glob
import gzip
import json
import os
import shutil
import subprocess
import sys
import os
import gzip

from tempfile import TemporaryDirectory
from download_packages import download_archive

Expand Down Expand Up @@ -69,6 +71,23 @@ def make_packages_tar_gz(
)
os.rmdir(unpack)

# cleanup step: remove all PACKAGE/doc/*.aux etc. etc. files
for ext in [
"aux",
"bbl",
"blg",
"brf",
"idx",
"ilg",
"ind",
"log",
"out",
"pnr",
"toc",
]:
for f in glob.glob(f"{tempdir}/*/doc/*.{ext}"):
os.remove(f)

full_tarname = os.path.join(release_dir, tarname)
print("Creating final tarball: ", full_tarname)
subprocess.run(["tar", "czf", full_tarname, "-C", tempdir, "."])
Expand Down

0 comments on commit 105f8bd

Please sign in to comment.