Skip to content

add wget fallback in installation #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,17 @@ do_install () {

echo "Downloading latest binary (kool-$PLAT-$ARCH)..."

# TODO: fallback to wget if no curl available
rm -f /tmp/kool_binary
curl -fsSL "$DOWNLOAD_URL/kool-$PLAT-$ARCH" -o /tmp/kool_binary
rm -f /tmp/kool_binary

# fallback to wget if no curl available
if command -v curl &> /dev/null; then
curl -fsSL "$DOWNLOAD_URL/kool-$PLAT-$ARCH" -o /tmp/kool_binary
elif command -v wget &> /dev/null; then
wget -qO /tmp/kool_binary "$DOWNLOAD_URL/kool-$PLAT-$ARCH"
else
echo -e "\033[31;31mError: Neither curl nor wget is available. Please install one of them to proceed.\033[0m"
exit 1
fi

# check for running kool process which would prevent
# replacing existing version under Linux.
Expand Down
Loading