Add new file

This commit is contained in:
RaspbianProyect by HP3ICC 2023-02-21 18:00:07 +00:00
parent e3ab748686
commit 1f045bdec4
1 changed files with 28 additions and 0 deletions

28
update.sh Normal file
View File

@ -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