From 039a441a5d1be14c72fe34e2f9df3ff357e2b521 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Feb 2026 05:35:58 +0000 Subject: [PATCH] Make installer compatible with curl pipe execution - Read user input from /dev/tty so prompts work when the script is fetched via curl (bash -c "$(curl ...)" or curl | bash) - Update usage header with the one-liner curl command - Fix $0 reference in root_check for bash -c context https://claude.ai/code/session_013gJJD3cxafQSVmyn9pXcdn --- scripts/proxmox/soulsync-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/proxmox/soulsync-install.sh b/scripts/proxmox/soulsync-install.sh index f7552400..f4721622 100755 --- a/scripts/proxmox/soulsync-install.sh +++ b/scripts/proxmox/soulsync-install.sh @@ -7,7 +7,7 @@ # inside a Debian/Ubuntu-based Proxmox LXC container. # # Usage: -# bash soulsync-install.sh +# bash -c "$(curl -fsSL https://raw.githubusercontent.com/tanujdargan/SoulSync/main/scripts/proxmox/soulsync-install.sh)" # # Requirements: # - Debian 12+ or Ubuntu 22.04+ LXC container @@ -169,7 +169,7 @@ BANNER root_check() { if [[ "$(id -u)" -ne 0 ]]; then msg_error "This script must be run as root" - echo -e "\n${TAB}Run with: ${GN}sudo bash $(basename "$0")${CL}\n" >&2 + echo -e "\n${TAB}Run as root or with: ${GN}sudo bash soulsync-install.sh${CL}\n" >&2 exit 1 fi } @@ -241,7 +241,7 @@ prompt_input() { else printf "\n${TAB}${GEAR} ${YW}%s${CL}: " "$prompt" >&2 fi - read -r result + read -r result &2 - read -rs result + read -rs result &2 echo "$result" } @@ -267,7 +267,7 @@ prompt_confirm() { fi printf "\n${TAB}${INFO} ${YW}%s ${DIM}[%s]${CL}: " "$prompt" "$hint" >&2 - read -r result + read -r result &2 - read -r result + read -r result = 1 && result <= ${#options[@]})); then echo "$result" return