diff --git a/README.md b/README.md index 40775a2..2bbf9f7 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ROS 2 пакеты для управления роботом **KUKA LBR IIWA 7 Для установки запустите скрипт одной командой: ```bash -curl -fsSL https://gitverse.ru/api/repos/daniel-robotics/lightweight-cobot/raw/branch/main/install.sh +curl -fsSL https://gitverse.ru/api/repos/daniel-robotics/lightweight-cobot/raw/branch/dev/install.sh | bash ``` Скрипт установит ROS 2 Jazzy, Webots, соберёт рабочее пространство и установит CLI `cobot`. diff --git a/install.sh b/install.sh index 4a96dac..4a1845c 100644 --- a/install.sh +++ b/install.sh @@ -215,6 +215,8 @@ check_python() { resolve_install_dir() { local script_dir script_dir="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd || pwd)" + local repo_branch + repo_branch="${REPO_BRANCH:-$(git -C "$script_dir" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "master")}" # Running directly from inside the cloned repo (not via curl|bash) if [ -f "$script_dir/setup.py" ] && [ -d "$script_dir/.git" ]; then @@ -226,7 +228,7 @@ resolve_install_dir() { # Repo already cloned — pull instead of re-clone if [ -d "$INSTALL_DIR/.git" ]; then log_info "Repo already exists at $INSTALL_DIR — pulling latest..." - git -C "$INSTALL_DIR" pull --ff-only origin dev