From afbb0315c6f4e0e2d1dd594856f25f8d662d521a Mon Sep 17 00:00:00 2001 From: Liz Cray Date: Mon, 5 Aug 2024 21:07:52 -0400 Subject: [PATCH] Fixed home reference for sed --- setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 0cc9606..de09b95 100755 --- a/setup.sh +++ b/setup.sh @@ -97,9 +97,11 @@ echo.Cyan "Setup Moonraker" cd $ROOT_DIR/$PRINTER_NAME/printer_data/config sed -i -e "s/PRINTERNAME/$PRINTER_NAME/g" "moonraker.conf" sed -i -e "s/pi/$USER/g" "moonraker.conf" + echo.Cyan "Setup Mainsail Config" cd $ROOT_DIR/$PRINTER_NAME/mainsail-config -sed -i -e "s/~\/printer_data/$HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg" +USABLE_HOME=`echo "$HOME" | sed -e 's/\//\\\//'` +sed -i -e "s/~\/printer_data/$USABLE_HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg" sed -i -e "s/pi/$USER/g" "client.cfg" # Download Mainsail