Fixed home reference for sed

This commit is contained in:
Elizabeth Cray 2024-08-05 21:07:52 -04:00
parent b551aee9ee
commit afbb0315c6

View File

@ -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