From 5b4d54240c52a1533dbb3f9aa46a0667e9b5b869 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 29 Jan 2025 13:47:59 -0600 Subject: [PATCH] install: allow `busybox unzip` according to issue #172, `busybox unzip` is an alternative to installing unzip or 7z. busybox is installed by default on Ubuntu 24.04.1 LTS but unzip/7z are not. note: busybox is not installed on macOS 15.3 by default but unzip is. --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5556fac1..995864c1 100755 --- a/install.sh +++ b/install.sh @@ -4,8 +4,8 @@ set -e -if ! command -v unzip >/dev/null && ! command -v 7z >/dev/null; then - echo "Error: either unzip or 7z is required to install Deno (see: https://github.com/denoland/deno_install#either-unzip-or-7z-is-required )." 1>&2 +if ! command -v unzip >/dev/null && ! command -v busybox unzip > /dev/null && ! command -v 7z >/dev/null; then + echo "Error: either unzip or busybox unzip or 7z are required to install Deno (see: https://github.com/denoland/deno_install#either-unzip-or-7z-is-required )." 1>&2 exit 1 fi @@ -79,6 +79,8 @@ fi curl --fail --location --progress-bar --output "$exe.zip" "$deno_uri" if command -v unzip >/dev/null; then unzip -d "$bin_dir" -o "$exe.zip" +elif command -v busybox >/dev/null; then + busybox unzip -d "$bin_dir" -o "$exe.zip" else 7z x -o"$bin_dir" -y "$exe.zip" fi