Finish knocking out bugs

This commit is contained in:
Elizabeth Cray 2024-08-05 22:31:47 -04:00
parent 065e262b0e
commit 317a4c0a37
2 changed files with 25 additions and 22 deletions

View File

@ -1,18 +1,18 @@
git
virtualenv
python-dev
libffi-dev
build-essential
mariadb-server
libncurses-dev
libusb-dev
avrdude
gcc-avr
binutils-avr
avr-libc
stm32flash
dfu-util
libnewlib-arm-none-eabi
gcc-arm-none-eabi
avrdude
binutils-arm-none-eabi
binutils-avr
build-essential
dfu-util
gcc-arm-none-eabi
gcc-avr
git
libffi-dev
libncurses-dev
libnewlib-arm-none-eabi
libusb-1.0
libusb-dev
mariadb-server
python3-dev
stm32flash
virtualenv

View File

@ -1,6 +1,10 @@
#!/bin/bash
# TODO: CHANGE KLIPPER PORTS
# TODO: Setup Mainsail
# TODO: Add Crowsnest Support
# TODO: Add Override cmd arguments
# TODO: Avoid duplicate printer names
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do
@ -28,7 +32,6 @@ for PACKAGE in `cat $ROOT_DIR/config/apt-packages`; do
done
# Name Printer
# Todo: avoid duplications
NAME_NOT_VALID=true
while $NAME_NOT_VALID ; do
PRINTER_NAME=$(dialog --backtitle 'drwho@hackers.town' --inputbox 'Name This Printer' 8 40 "${PRINTER_NAME}" 3>&1 1>&2 2>&3)
@ -105,9 +108,6 @@ 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/\//\\\\\\\\\//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
@ -141,13 +141,16 @@ mkdir -p $HOME/$PRINTER_NAME
cp -r $ROOT_DIR/$PRINTER_NAME/* $HOME/$PRINTER_NAME
# Create Empty dirs
dirs=(logs gcodes certs backup mainsail-config)
dirs=(logs gcodes certs backup)
for d in ${dirs[@]}; do
mkdir -p "$HOME/$PRINTER_NAME/$d"
D="$HOME/$PRINTER_NAME/printer_data/$d"
echo.ICyan "make $D"
mkdir -p $D
done
touch $HOME/$PRINTER_NAME/printer_data/logs/klippy.log
# Configure System Services
# TODO: Add Crowsnest Support
cd $ROOT_DIR/config/services
SERVICES=()
for f in *.service; do