scripts/dl_github_archive: add support for packing zstd archive

Add support for packing .zst archive when creating Github mirror tar.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2024-03-25 11:00:38 +01:00 committed by Robert Marko
parent cce4124f42
commit c922c78094
1 changed files with 5 additions and 1 deletions

View File

@ -138,7 +138,11 @@ class Path(object):
envs = os.environ.copy()
if ts is not None:
args.append('--mtime=@%d' % ts)
if into.endswith('.xz'):
if into.endswith('.zst'):
envs['ZSTD_CLEVEL'] = '20'
envs['ZSTD_NBTHREADS'] = '0'
args.append('--zstd')
elif into.endswith('.xz'):
envs['XZ_OPT'] = '-7e'
args.append('-J')
elif into.endswith('.bz2'):