Open MarkTiedemann opened 3 years ago
Currently, we require unzip to be installed for extracing the Zip archive (see https://github.com/denoland/deno_install/blob/master/install.sh#L7-L10, https://github.com/denoland/deno_install#unzip-is-required).
unzip
Contrary to gnutar, bsdtar (a tar implementation by libarchive) is able to extract .zip files, too. It's the default tar on FreeBSD, NetBSD, MacOS and Windows (see https://github.com/libarchive/libarchive/wiki/LibarchiveUsers).
gnutar
bsdtar
tar
.zip
So if unzip is unavailable, we could check for (bsd)tar, and only if both are unavailable, fail with an error message.
(bsd)tar
I'm using a similar technique in deno.mk (see https://github.com/MarkTiedemann/deno.mk/blob/master/deno.mk#L68-L72).
Most Linux distros come with busybox preinstalled, so it's as simple as busybox unzip deno.zip -o /path/to/install
busybox unzip deno.zip -o /path/to/install
I'm not sure if MacOS has it by default.
Currently, we require
unzip
to be installed for extracing the Zip archive (see https://github.com/denoland/deno_install/blob/master/install.sh#L7-L10, https://github.com/denoland/deno_install#unzip-is-required).Contrary to
gnutar
,bsdtar
(atar
implementation by libarchive) is able to extract.zip
files, too. It's the defaulttar
on FreeBSD, NetBSD, MacOS and Windows (see https://github.com/libarchive/libarchive/wiki/LibarchiveUsers).So if
unzip
is unavailable, we could check for(bsd)tar
, and only if both are unavailable, fail with an error message.I'm using a similar technique in deno.mk (see https://github.com/MarkTiedemann/deno.mk/blob/master/deno.mk#L68-L72).