34 lines
665 B
Bash
Executable File
34 lines
665 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Startscript für den Roboter
|
|
# + Updatefunktion
|
|
|
|
#GITDIR=~/git/robotSoSe2022
|
|
GITDIR=~/git/robotik-wise23
|
|
#GITDIR=./
|
|
|
|
Choice=$( whiptail --title "Hausaufgabenrobo Start und Update" --radiolist \
|
|
"Bitte wählen" 20 78 4 \
|
|
"START" "Hausaufgabenrobo 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/robo
|
|
python3 csv-read.py
|
|
;;
|
|
"UPDATE")
|
|
cd $GITDIR
|
|
git pull
|
|
;;
|
|
else)
|
|
echo "hier war was komisch"
|
|
exit 1
|
|
;;
|
|
esac
|
|
else # abbrechen gedrückt
|
|
exit 1
|
|
|
|
fi
|