summaryrefslogtreecommitdiff
path: root/Build/source/utils/dialog/dialog-1.1-20080819/samples/menubox9
blob: 9f46a16bebb1cdf63d6d9f94b0ba8afe76452b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# $Id: menubox9,v 1.1 2003/09/23 23:02:08 tom Exp $
: ${DIALOG=dialog}

exec 3>&1
value=`$DIALOG --help-button \
	--clear \
	--title "Select Linux installation partition:" \
	--menu \
"Please select a partition from the following list to use for your \
root (/) Linux partition." 13 70 5 \
"/dev/hda2" "Linux native 30724312K" \
"/dev/hda4" "Linux native 506047K" \
"/dev/hdb1" "Linux native 4096543K" \
"/dev/hdb2" "Linux native 2586465K" \
"---" "(add none, continue with setup)" \
"---" "(add none, continue with setup)" \
"---" "(add none, continue with setup)" \
"---" "(add none, continue with setup)" \
"---" "(add none, continue with setup)" \
2>&1 1>&3`
retval=$?
exec 3>&-

case $retval in
  0)
    echo "$value chosen.";;
  1)
    echo "Cancel pressed.";;
  2)
    echo "Help pressed ($value)";;
  255)
    if test -n "$value" ; then
      echo "$value"
    else
      echo "ESC pressed."
    fi
    ;;
esac