Alternative to sed
This commit is contained in:
parent
afbb0315c6
commit
8983526714
@ -3,6 +3,7 @@ virtualenv
|
|||||||
python-dev
|
python-dev
|
||||||
libffi-dev
|
libffi-dev
|
||||||
build-essential
|
build-essential
|
||||||
|
mariadb-server
|
||||||
libncurses-dev
|
libncurses-dev
|
||||||
libusb-dev
|
libusb-dev
|
||||||
avrdude
|
avrdude
|
||||||
|
8
setup.sh
8
setup.sh
@ -100,8 +100,12 @@ sed -i -e "s/pi/$USER/g" "moonraker.conf"
|
|||||||
|
|
||||||
echo.Cyan "Setup Mainsail Config"
|
echo.Cyan "Setup Mainsail Config"
|
||||||
cd $ROOT_DIR/$PRINTER_NAME/mainsail-config
|
cd $ROOT_DIR/$PRINTER_NAME/mainsail-config
|
||||||
USABLE_HOME=`echo "$HOME" | sed -e 's/\//\\\//'`
|
# USABLE_HOME=`echo "$HOME" | sed -e 's/\//\\\\\\\\\//g'`
|
||||||
sed -i -e "s/~\/printer_data/$USABLE_HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg"
|
# echo "s/~\/printer_data/$USABLE_HOME\/$PRINTER_NAME\/printer_data/g"
|
||||||
|
# sed -i -e "s/~\/printer_data/$USABLE_HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg"
|
||||||
|
cat "client.cfg" | replace "~/printer_data" "$HOME/$PRINTER_NAME/printer_data" > tmp.client.cfg
|
||||||
|
rm client.cfg
|
||||||
|
mv tmp.client.cfg client.cfg
|
||||||
sed -i -e "s/pi/$USER/g" "client.cfg"
|
sed -i -e "s/pi/$USER/g" "client.cfg"
|
||||||
|
|
||||||
# Download Mainsail
|
# Download Mainsail
|
||||||
|
Loading…
Reference in New Issue
Block a user