kabiroberai / swift-toolchain-linux

Swift toolchain for Linux
MIT License
11 stars 5 forks source link

Fix unpacking macOS toolchain on Linux #1

Closed Qusic closed 5 years ago

Qusic commented 5 years ago
  1. GNU tar doesn't support cpio archives.
  2. File pattern usage for extraction is different for GNU cpio and BSD cpio. For simplicity, we extract all files here.
kabiroberai commented 5 years ago

Thanks for the PR! A few questions:

Qusic commented 5 years ago

cpio exists on macOS. And it works on macOS as I tested on 10.14.5.

Now I am trying to get it working in ubuntu 18.04 docker container. cpio is available from apt-get, but xar can only be compiled from source(with several dependencies from apt-get as well). It's actually harder to make it out-of-the-box on Linux considering various distributions. So how much automation do you think we should implement here?

Qusic commented 5 years ago

Updated to detect the platform and clean up properly. Also added Linux prerequisites section in README.