summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authoralaviss <leorize+oss@disroot.org>2020-05-26 12:05:51 +0000
committerGitHub <noreply@github.com>2020-05-26 14:05:51 +0200
commitb749d58ea1d77aab0ab758a17140ebc57e32f8c8 (patch)
treee684b35de6c8b2d61f58c094f2bde78bea20eaee /tools
parent38cb27765357e9b077b6b63fb7f9292cbd74b4e6 (diff)
downloadNim-b749d58ea1d77aab0ab758a17140ebc57e32f8c8.tar.gz
niminst: use threaded compression when supported (#14455)
Diffstat (limited to 'tools')
-rw-r--r--tools/niminst/niminst.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/niminst/niminst.nim b/tools/niminst/niminst.nim
index 4746f328a..e170bc5d7 100644
--- a/tools/niminst/niminst.nim
+++ b/tools/niminst/niminst.nim
@@ -700,8 +700,10 @@ RunProgram="tools\downloader.exe"
           if execShellCmd("tar cf $1.tar $1" % proj) != 0:
             echo("External program failed")
 
-        if execShellCmd("xz -9f $1.tar" % proj) != 0:
-          echo("External program failed")
+        if execShellCmd("xz -T0 -9f $1.tar" % proj) != 0:
+          # Maybe the xz version is too old and doesn't support threading
+          if execShellCmd("xz -9f $1.tar" % proj) != 0:
+            echo("External program failed")
     finally:
       setCurrentDir(oldDir)