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