File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,17 @@ do_install () {
4040
4141 echo " Downloading latest binary (kool-$PLAT -$ARCH )..."
4242
43- # TODO: fallback to wget if no curl available
44- rm -f /tmp/kool_binary
45- curl -fsSL " $DOWNLOAD_URL /kool-$PLAT -$ARCH " -o /tmp/kool_binary
43+ rm -f /tmp/kool_binary
44+
45+ # fallback to wget if no curl available
46+ if command -v curl & > /dev/null; then
47+ curl -fsSL " $DOWNLOAD_URL /kool-$PLAT -$ARCH " -o /tmp/kool_binary
48+ elif command -v wget & > /dev/null; then
49+ wget -qO /tmp/kool_binary " $DOWNLOAD_URL /kool-$PLAT -$ARCH "
50+ else
51+ echo -e " \033[31;31mError: Neither curl nor wget is available. Please install one of them to proceed.\033[0m"
52+ exit 1
53+ fi
4654
4755 # check for running kool process which would prevent
4856 # replacing existing version under Linux.
You can’t perform that action at this time.
0 commit comments