From 283051d6c83a167a32f537dd48e6c2e6a93c25ed Mon Sep 17 00:00:00 2001 From: Raphael Numbus Date: Sun, 23 Nov 2025 21:28:00 +0100 Subject: [PATCH] Fixed unwanted apparent output and sed command. --- deploy.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy.sh b/deploy.sh index 2226815..9bfba34 100644 --- a/deploy.sh +++ b/deploy.sh @@ -109,7 +109,7 @@ hardware_detection() { TARGET_GRAPHICS="false" fi echo -e "\n\n 🔎 Detecting transconding acceleration on target host..." - if ssh_to_host "ls /dev/dri/renderD128" 2>/dev/null; then + if ssh_to_host "ls /dev/dri/renderD128 2>/dev/null"; then echo -e " ✅ Transcoding capable card detected." TARGET_GRAPHICS_RENDERER="true" else @@ -117,7 +117,7 @@ hardware_detection() { TARGET_GRAPHICS_RENDERER="false" fi echo -e "\n\n 🔎 Detecting USB Google Coral TPU on target host..." - if ssh_to_host "lsusb | grep -iq 'google'" 2>/dev/null; then + if ssh_to_host "lsusb | grep -iq 'google' 2>/dev/null"; then echo -e " ✅ USB Google Coral TPU detected." TARGET_USB_CORAL="true" else @@ -125,7 +125,7 @@ hardware_detection() { TARGET_USB_CORAL="false" fi echo -e "\n\n 🔎 Detecting Zigbee coordinator on target host..." - if ssh_to_host "ls /dev/serial/by-id/ | grep -i 'zigbee'" 2>/dev/null; then + if ssh_to_host "ls /dev/serial/by-id/ | grep -i 'zigbee' 2>/dev/null"; then echo -e " ✅ Zigbee device found in /dev/serial/by-id/." TARGET_ZIGBEE_DEVICE=$(ssh_to_host "ls /dev/serial/by-id/ | grep -i 'zigbee'") TARGET_ZIGBEE="true" @@ -216,19 +216,19 @@ files_generation() { }' docker/frigate.nix fi if [[ "$TARGET_ZIGBEE" == "true" ]]; then - sed -i.bak ' - /^[[:space:]]*# ----------------------------------- #/{ + sed -i.bak \ + '/^[[:space:]]*# ----------------------------------- #/{ N; /DEVICES SECTION WILL APPEAR HERE IF/{ N; /ZIGBEE USB DEVICE IS PRESENT/{ N; - /----------------------------------- #/c\ + /----------------------------------- #/c\'" devices:\ - /dev/serial/by-id/${TARGET_ZIGBEE_DEVICE}:/dev/ttyUSB0 } } - }' docker/hass.nix + }" docker/hass.nix fi echo -e "\n\n ✅ Copying files to the new installation..."