Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- echo $PWD
- WHERE=`ls -R /media/*/rjam2014menu.sh`
- WORKDIR=$(dirname ${WHERE})
- cd $WORKDIR
- echo $PWD
- BACKTITLE="Raspberry Jamboree 2014"
- TITLE="@Cymplecy's Wonderful Menu of Jamboree Goodies"
- 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
- status="0"
- while [ "$status" -eq 0 ]
- do
- choice=$(whiptail --cancel-button Exit --backtitle "$BACKTITLE" --title "$TITLE" --menu "Make a choice" 16 78 5 \
- "ScratchGPIO4" "ScratchGPIO4 Installer" \
- "MinecraftBook" "Description of Application 2" \
- "Mario" "Description of Application 3" 3>&2 2>&1 1>&3)
- option=$(echo $choice | tr '[:upper:]' '[:lower:]' | sed 's/ //g')
- case "${option}" in
- scratchgpio4)
- echo $PWD
- sudo /bin/bash ${PWD}/scratchgpio4/isgh4.sh
- ;;
- MinecraftBook)
- sudo /bin/bash xpdf ${PWD}/minecraftbook/minecraftbook.pdf
- ;;
- Mario)
- sudo /bin/bash python ${PWD}/mario/mario_level_1.py
- ;;
- *) sleep 5
- printf "Good Byeeeeeeeeeeeee!!!\n"
- status=1
- exit
- ;;
- esac
- done
- ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement