diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..e0a8d23 --- /dev/null +++ b/start.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Startscript für den Roboter +# + Updatefunktion + +#GITDIR=~/git/robotSoSe2022 +GITDIR=~/git/robotik-wise23 + +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 + ./robostart.sh + ;; + "UPDATE") + cd $GITDIR + git pull + ;; + else) + echo "hier war was komisch" + exit 1 + ;; + esac +else # abbrechen gedrückt + exit 1 + +fi