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