blob: c5a546f41b950222ed67d682379af6764941b79c (
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
|
#!/bin/sh
DIALOG=${DIALOG=/usr/bin/dialog}
$DIALOG --clear --title "TREE BOX" \
--hline "Press arrows, TAB or Enter" \
--hfile "../COPYING" \
--tree "/" \
"This is tree box" -1 -1 10 \
`find -x / -type d` 2>/tmp/tree.tmp.$$
retval=$?
choice=`cat /tmp/tree.tmp.$$`
case $retval in
0)
echo "'$choice' chosen.";;
1)
echo "Cancel pressed.";;
255)
[ -z "$choice" ] || echo $choice ;
echo "ESC pressed.";;
esac
rm -f /tmp/tree.tmp.$$
|