Skip to content

Commit

Permalink
chore: install.sh to test for curl, otherwise use wget
Browse files Browse the repository at this point in the history
  • Loading branch information
Tasos Bitsios authored and PhearZero committed Jan 15, 2025
1 parent 3270dc2 commit 27dcf54
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 27dcf54

Please sign in to comment.