From 27dcf54cb8c5f269f840c45ef9a10f60e66f64b5 Mon Sep 17 00:00:00 2001 From: Tasos Bitsios Date: Wed, 15 Jan 2025 17:11:43 +0100 Subject: [PATCH] chore: install.sh to test for curl, otherwise use wget --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ee6f2c8f..34a0eff5 100755 --- a/install.sh +++ b/install.sh @@ -88,8 +88,12 @@ target="nodekit-$platform" url="$release/$target" echo -e "${Opaque}Downloading:${Reset}${Bold_White} $target ${Reset}from $url" -curl --fail --location --progress-bar --output nodekit "$url" || -error "Failed to download ${target} from ${release} ${url}" +errormessage="Failed to download ${target} from ${release} ${url}" +if curl --version > /dev/null 2>&1; then + curl --fail --location --progress-bar --output nodekit "$url" || error "$errormessage" +else + wget -qO nodekit --show-progress "$url" || error "$errormessage" +fi chmod +x nodekit