Advertisement
cymplecy

Untitled

Feb 20th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.26 KB | None | 0 0
  1. #! /bin/bash
  2. BACKTITLE="Raspberry Jamboree 2014"
  3. TITLE="@Cymplecy's Wonderful Menu of Jamboree Goodies"
  4. whiptail --backtitle "$BACKTITLE" --title "$TITLE" --msgbox "On the next screen you will will a menu with oodles of good things to install on your Raspberry Pi. use the arrow and tab keys to move around the menu and highlight the various items or buttons then press the return key to select that item. You must hit OK to continue." 10 78
  5. status="0"
  6. while [ "$status" -eq 0 ]
  7. do
  8.     choice=$(whiptail --cancel-button Exit --backtitle "$BACKTITLE" --title "$TITLE" --menu "Make a choice" 16 78 5 \
  9.     "Application 1" "Description of Application 1" \
  10.     "Application 2" "Description of Application 2" \
  11.     "Application 3" "Description of Application 3" 3>&2 2>&1 1>&3)
  12.     option=$(echo $choice | tr '[:upper:]' '[:lower:]' | sed 's/ //g')
  13.     case "${option}" in
  14.         application1)
  15.            #fill in execution command for app 1
  16.         ;;
  17.         application2)
  18.             #fill in execution details for app 2
  19.         ;;
  20.          application3)
  21.             #fill in execution details for app 3 and wash,rinse, repeat
  22.         ;;
  23.         *)
  24.             printf "Byeeeeeeeeeeeee!!!\n"
  25.             status=1
  26.             exit
  27.         ;;
  28.     esac
  29. done
  30.     ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement