Update updater

This commit is contained in:
Tobias Hopp 2023-02-13 11:30:26 +01:00
parent b05b111140
commit 07b52fc2fb

View File

@ -1,11 +1,16 @@
#!/bin/bash #!/bin/bash
cd /home/itender/itender || exit -1 cd /home/itender/itender || exit -1
git pull "https://tobiash:!IwedwrimmVeudiweN!@git.gaminggeneration.de/tobiash/itender.git" --quiet
yarn if [ -z "$1" ]
yarn run compile then
cd ./arduino/itender/ git pull "https://tobiash:!IwedwrimmVeudiweN!@git.gaminggeneration.de/tobiash/itender.git" --quiet
arduino-cli compile --fqbn arduino:avr:mega itender.ino || true else
sudo systemctl stop itender yarn
timeout 30 arduino-cli upload --port /dev/ttyACM0 --fqbn arduino:avr:mega itender.ino || true yarn run compile
sudo systemctl start itender cd ./arduino/itender/
arduino-cli compile --fqbn arduino:avr:mega itender.ino || true
sudo systemctl stop itender
timeout 40 arduino-cli upload --port /dev/ttyACM0 --fqbn arduino:avr:mega itender.ino || true
sudo systemctl start itender
fi
exit 0 exit 0