Whiptail hinzugefügt
This commit is contained in:
1 parent
299e54986a
commit
c8d96fecdc
1 file changed
+27
-2
@@ -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
|
||||
Reference in new issue
Block a user