Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit b3582a1

Browse files
authored
Enhance dependency installation script (#366)
Signed-off-by: bo.jiang <[email protected]>
1 parent a51e9ca commit b3582a1

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

quickstart/install-deps.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ install_pkg() {
4040
}
4141

4242
# Install base utilities
43-
for pkg in git jq make curl tar wget; do
43+
for pkg in git jq make curl tar; do
4444
if ! command -v "$pkg" &> /dev/null; then
4545
install_pkg "$pkg"
4646
fi
@@ -49,13 +49,8 @@ done
4949
# Install yq (v4+)
5050
if ! command -v yq &> /dev/null; then
5151
echo "Installing yq..."
52-
if [[ "$OS" == "linux" ]]; then
53-
sudo wget -qO /usr/local/bin/yq \
54-
https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${ARCH}
55-
else # macOS
56-
sudo wget -qO /usr/local/bin/yq \
57-
https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_${ARCH}
58-
fi
52+
sudo curl -sLo /usr/local/bin/yq \
53+
"https://github.com/mikefarah/yq/releases/latest/download/yq_${OS}_${ARCH}"
5954
sudo chmod +x /usr/local/bin/yq
6055
fi
6156

@@ -75,9 +70,9 @@ fi
7570
# Install Helm
7671
if ! command -v helm &> /dev/null; then
7772
echo "Installing Helm..."
78-
HELM_VER="v3.17.3"
73+
HELM_VER=$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r '.tag_name')
7974
TARBALL="helm-${HELM_VER}-${OS}-${ARCH}.tar.gz"
80-
wget "https://get.helm.sh/${TARBALL}"
75+
curl -sLO "https://get.helm.sh/${TARBALL}"
8176
tar -zxvf "${TARBALL}"
8277
sudo mv "${OS}-${ARCH}/helm" /usr/local/bin/helm
8378
rm -rf "${OS}-${ARCH}" "${TARBALL}"

0 commit comments

Comments
 (0)