From dca056064a57259eda920cc218a0216d80016cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=B8=D0=BB=20=D0=93=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=B0=D1=80=D1=8C?= Date: Thu, 18 Jun 2026 11:15:10 +0300 Subject: [PATCH] fix: update installation script to use master branch for cloning --- README_en.md | 2 +- install.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README_en.md b/README_en.md index b21140d..32e7d6c 100644 --- a/README_en.md +++ b/README_en.md @@ -30,7 +30,7 @@ ROS 2 packages for controlling the **KUKA LBR IIWA 7 R800**: communication with Install everything with a single command: ```bash -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/master/install.sh | bash ``` The script installs ROS 2 Jazzy, Webots, builds the workspace, and installs the `cobot` CLI. diff --git a/install.sh b/install.sh index 4a1845c..8be0fba 100644 --- a/install.sh +++ b/install.sh @@ -22,6 +22,10 @@ BOLD='\033[1m' PYTHON_VERSION="3.11" REPO_URL="https://gitverse.ru/daniel-robotics/lightweight-cobot.git" +# Branch to clone. Override via: curl ... | bash -s dev +# Defaults to master when not specified. +REPO_BRANCH="${REPO_BRANCH:-${1:-master}}" + # Where to clone the project. Can be overridden by the user with COBOT_INSTALL_DIR. # Куда клонировать проект. Пользователь может переопределить через COBOT_INSTALL_DIR. INSTALL_DIR="${COBOT_INSTALL_DIR:-$HOME/.lwc}" @@ -215,8 +219,7 @@ 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")}" + local repo_branch="$REPO_BRANCH" # Running directly from inside the cloned repo (not via curl|bash) if [ -f "$script_dir/setup.py" ] && [ -d "$script_dir/.git" ]; then