diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..076d6cb --- /dev/null +++ b/update.sh @@ -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