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

if command -v wget >/dev/null 2>&1; then
wget -qO- https://astral.sh/uv/install.sh | sh
refresh_uv_env
return
fi

echo "Error: curl or wget is required to install uv." >&2
exit 1
}

refresh_uv_env() {
local uv_env="${XDG_BIN_HOME:-$HOME/.local/bin}/env"
if [ -f "$uv_env" ]; then
# shellcheck disable=SC1090
. "$uv_env"
else
export PATH="${XDG_BIN_HOME:-$HOME/.local/bin}:$PATH"
fi
}

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