fix(installer): default to fork version when run via curl pipe [skip ci]

This commit is contained in:
muava12 2026-02-23 03:01:32 +08:00
parent c3f6abd4a5
commit ecb9cd738e

View file

@ -35,22 +35,28 @@ echo " ─────────────────────"
echo ""
# Ask user which version to install
if [ -t 0 ]; then
# Interactive mode (run directly from terminal)
echo -e "${BOLD}Select version to install:${RESET}"
echo " 1) Original (sipeed/picoclaw)"
echo " 2) Fork (muava12/picoclaw-fork)"
echo ""
read -p "Choose [1-2]: " version_choice
if [[ "$version_choice" == "2" ]]; then
URL="https://github.com/muava12/picoclaw-fork/releases/latest/download/picoclaw_Linux_arm64.tar.gz"
REPO="muava12/picoclaw-fork"
echo ""
print_step "Selected: ${BOLD}Fork version${RESET}"
read -p "Choose [1-2]: " version_choice < /dev/tty
else
# Non-interactive mode (curl | bash) — default to fork
version_choice="2"
fi
if [[ "$version_choice" == "1" ]]; then
URL="https://github.com/sipeed/picoclaw/releases/latest/download/picoclaw_Linux_arm64.tar.gz"
REPO="sipeed/picoclaw"
echo ""
print_step "Selected: ${BOLD}Original version${RESET}"
else
URL="https://github.com/muava12/picoclaw-fork/releases/latest/download/picoclaw_Linux_arm64.tar.gz"
REPO="muava12/picoclaw-fork"
echo ""
print_step "Selected: ${BOLD}Fork version${RESET}"
fi
print_step "Checking for latest version..."