scripts/dl_github_archive: add support for packing zstd archive
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 25 Mar 2024 10:00:38 +0000 (11:00 +0100)
committerRobert Marko <robimarko@gmail.com>
Sat, 6 Apr 2024 09:24:18 +0000 (11:24 +0200)
Add support for packing .zst archive when creating Github mirror tar.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
scripts/dl_github_archive.py

index 580b7cba38aaf4ad3dcd7535f48117e405964f17..744c441ca7067604f7549cbba914b54d67a083c2 100755 (executable)
@@ -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'):