Skip to content
Open
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
23 changes: 16 additions & 7 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ set -euo pipefail
install_uv() {
if command -v curl >/dev/null 2>&1; then
curl -fsSL https://astral.sh/uv/install.sh | sh
return
fi

if command -v wget >/dev/null 2>&1; then
elif command -v wget >/dev/null 2>&1; then
wget -qO- https://astral.sh/uv/install.sh | sh
return
else
echo "Error: curl or wget is required to install uv." >&2
exit 1
fi

echo "Error: curl or wget is required to install uv." >&2
exit 1
# The upstream uv installer writes ${XDG_BIN_HOME:-$HOME/.local/bin}/env and
# prints "Run 'source ...' to add uv to your PATH" — but it does not source
# the file itself. Source it here so the rest of THIS script (and the user's
# immediate `kimi` invocation) can find uv on PATH.
uv_env="${XDG_BIN_HOME:-$HOME/.local/bin}/env"
if [ -f "$uv_env" ]; then
# shellcheck disable=SC1090
. "$uv_env"
else
# Fallback for older uv installers that may not write an env script.
export PATH="${XDG_BIN_HOME:-$HOME/.local/bin}:$PATH"
fi
}

if command -v uv >/dev/null 2>&1; then
Expand Down
Loading