From c8d96fecdc3b1eba49004dd257736311c40bf965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Runden?= Date: Fri, 12 May 2023 18:37:38 +0200 Subject: [PATCH] =?UTF-8?q?Whiptail=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 13b386d..4544d0c 100755 --- a/start.sh +++ b/start.sh @@ -1,2 +1,27 @@ -#!/bin/bash -echo "Hier wird ein Startscript entstehen..." +#!/usr/bin/env bash +# Startscript für den Roboter +# + Updatefunktion + +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 ~/robotSoSe2022 + git pull + ;; + else) + echo "hier war was komisch" + exit 1 + ;; + esac +else # abbrechen gedrückt + exit 1 + +fi \ No newline at end of file