Skip to content
Merged
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
32 changes: 18 additions & 14 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -euo pipefail
# Usage: curl -fsSL https://raw.githubusercontent.com/TONresistor/teleton-agent/main/install.sh | bash
# ──────────────────────────────────────────────

REPO="TONresistor/teleton-agent"
REPO="tonresistor/teleton-agent"
DOCKER_IMAGE="ghcr.io/${REPO}:latest"
NPM_PACKAGE="teleton"
MIN_NODE_VERSION=20
Expand Down Expand Up @@ -147,13 +147,15 @@ main() {

# Offer choices based on what's available
if $has_docker && $has_node; then
echo -e "${BOLD}Choose installation method:${NC}"
echo " 1) npm install -g (recommended)"
echo " 2) Docker"
echo " 3) Git clone (development)"
echo ""
read -rp "Choice [1]: " choice
choice="${choice:-1}"
{
echo -e "${BOLD}Choose installation method:${NC}"
echo " 1) npm install -g (recommended)"
echo " 2) Docker"
echo " 3) Git clone (development)"
echo ""
read -rp "Choice [1]: " choice
choice="${choice:-1}"
} < /dev/tty
case "$choice" in
1) install_npm ;;
2) install_docker ;;
Expand All @@ -162,12 +164,14 @@ main() {
esac

elif $has_node; then
echo -e "${BOLD}Choose installation method:${NC}"
echo " 1) npm install -g (recommended)"
echo " 2) Git clone (development)"
echo ""
read -rp "Choice [1]: " choice
choice="${choice:-1}"
{
echo -e "${BOLD}Choose installation method:${NC}"
echo " 1) npm install -g (recommended)"
echo " 2) Git clone (development)"
echo ""
read -rp "Choice [1]: " choice
choice="${choice:-1}"
} < /dev/tty
case "$choice" in
1) install_npm ;;
2) install_git ;;
Expand Down