Files
robotSoSe2022/start.sh
T
2023-06-17 13:02:58 +02:00

32 lines
609 B
Bash
Executable File

#!/usr/bin/env bash
# Startscript für den Roboter
# + Updatefunktion
GITDIR=~/git/robotSoSe2022
Choice=$( whiptail --title "Roboter Start und Update" --radiolist \
"Bitte wählen" 20 78 4 \
"START" "Roboter 'testmotor' starten" ON \
"UPDATE" "Roboter Software aktualisieren" OFF 3>&1 1>&2 2>&3 )
ExitVAL=$?
if [ $ExitVAL = 0 ] ;then # OK
case $Choice in
"START")
echo starte nun robot
cd $GITDIR
./testmotor.py
;;
"UPDATE")
cd $GITDIR
git pull
;;
else)
echo "hier war was komisch"
exit 1
;;
esac
else # abbrechen gedrückt
exit 1
fi