mirror of https://gitlab.com/hp3icc/emq-TE1.git
Add new file
This commit is contained in:
parent
e3ab748686
commit
1f045bdec4
|
|
@ -0,0 +1,28 @@
|
|||
###menu
|
||||
sudo cat > /bin/menu-update <<- "EOF"
|
||||
#!/bin/bash
|
||||
while : ; do
|
||||
choix=$(whiptail --title "TE1ws+ / Raspbian Proyect HP3ICC Esteban Mackay 73." --menu "Suba o Baje con las flechas del teclado y seleccione el numero de opcion:" 24 67 15 \
|
||||
1 " dist-upgrade " \
|
||||
2 " Salir del menu " 3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
#on recupere ce choix
|
||||
#exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo "Your chosen option:" $choix
|
||||
else
|
||||
echo "You chose cancel."; break;
|
||||
fi
|
||||
# case : action en fonction du choix
|
||||
case $choix in
|
||||
1)
|
||||
sudo apt update && sudo apt-get dist-upgrade -y;;
|
||||
2)
|
||||
break;
|
||||
esac
|
||||
done
|
||||
exit 0
|
||||
EOF
|
||||
#
|
||||
chmod +x /bin/menu*
|
||||
menu-update
|
||||
Loading…
Reference in New Issue