Alternative to sed
This commit is contained in:
parent
afbb0315c6
commit
8983526714
@ -3,6 +3,7 @@ virtualenv
|
||||
python-dev
|
||||
libffi-dev
|
||||
build-essential
|
||||
mariadb-server
|
||||
libncurses-dev
|
||||
libusb-dev
|
||||
avrdude
|
||||
@ -14,4 +15,4 @@ dfu-util
|
||||
libnewlib-arm-none-eabi
|
||||
gcc-arm-none-eabi
|
||||
binutils-arm-none-eabi
|
||||
libusb-1.0
|
||||
libusb-1.0
|
||||
|
8
setup.sh
8
setup.sh
@ -100,8 +100,12 @@ sed -i -e "s/pi/$USER/g" "moonraker.conf"
|
||||
|
||||
echo.Cyan "Setup Mainsail Config"
|
||||
cd $ROOT_DIR/$PRINTER_NAME/mainsail-config
|
||||
USABLE_HOME=`echo "$HOME" | sed -e 's/\//\\\//'`
|
||||
sed -i -e "s/~\/printer_data/$USABLE_HOME\/$PRINTER_NAME\/printer_data/g" "client.cfg"
|
||||
# USABLE_HOME=`echo "$HOME" | sed -e 's/\//\\\\\\\\\//g'`
|
||||
# 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"
|
||||
|
||||
# Download Mainsail
|
||||
|
Loading…
Reference in New Issue
Block a user