We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 498c1a3 + af09ce8 commit c3b8496Copy full SHA for c3b8496
install.sh
@@ -40,9 +40,17 @@ do_install () {
40
41
echo "Downloading latest binary (kool-$PLAT-$ARCH)..."
42
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
+ rm -f /tmp/kool_binary
+
+ # 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
54
55
# check for running kool process which would prevent
56
# replacing existing version under Linux.
0 commit comments