fix: reoslve the uv issue

This commit is contained in:
Omid Zamani
2026-01-02 16:50:08 +01:00
parent e6cdcc207a
commit 68277cc929
7 changed files with 24 additions and 7 deletions

11
init.sh
View File

@@ -7,11 +7,20 @@ sudo apt update
sudo apt install -y git curl wget python3-dev gcc python3 nano sed
# 1.1 Install uv
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
if ! command -v uv &> /dev/null; then
if [ -f "/root/.local/bin/uv" ]; then
export PATH="/root/.local/bin:$PATH"
elif [ -f "$HOME/.local/bin/uv" ]; then
export PATH="$HOME/.local/bin:$PATH"
fi
fi
if ! command -v uv &> /dev/null; then
echo "--- Installing uv ---"
curl -LsSf https://astral.sh/uv/install.sh | sh
# Ensure uv is in PATH for the current script
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
fi
# 2. Clone the repository if not already in it