readme and license
[whiptailexamples/.git] / radiolist.sh
1 #!/bin/bash
2 DISTROS=$(whiptail --title "Test Checklist Dialog" --radiolist \
3 "What is the Linux distro of your choice?" 15 60 4 \
4 "debian" "Venerable Debian" ON \
5 "ubuntu" "Popular Ubuntu" OFF \
6 "centos" "Stable CentOS" OFF \
7 "mint" "Rising Star Mint" OFF 3>&1 1>&2 2>&3)
8  
9 exitstatus=$?
10 if [ $exitstatus = 0 ]; then
11     echo "The chosen distro is:" $DISTROS
12 else
13     echo "You chose Cancel."
14 fi