1251839Sbapt#!/bin/sh
2251839Sbapt# $Id: menubox12,v 1.3 2012/12/23 22:28:26 tom Exp $
3251839Sbapt
4251839Sbapt. ./setup-vars
5251839Sbapt
6251839Sbapt. ./setup-edit
7251839Sbapt
8251839Sbaptcase "x$DIALOGOPTS" in
9251839Sbapt*--no-items*|*--noitem*)
10251839Sbapt	CUT="cut -d: -f1,3"
11251839Sbapt	;;
12251839Sbapt*)
13251839Sbapt	CUT="cat"
14251839Sbapt	;;
15251839Sbaptesac
16251839Sbapt
17251839Sbapt$CUT >$input <<-EOF
18251839Sbapt	Linux:The Great Unix Clone for 386/486
19251839Sbapt	NetBSD:Another free Unix Clone for 386/486
20251839Sbapt	OS/2:IBM OS/2
21251839Sbapt	WIN NT:Microsoft Windows NT
22251839Sbapt	PCDOS:IBM PC DOS
23251839Sbapt	MSDOS:Microsoft DOS
24251839SbaptEOF
25251839Sbaptcat $input | sed -e 's/^/"/' -e 's/:/" "/g' -e 's/$/"/' >$output
26251839Sbaptcat $output >$input
27251839Sbapt
28251839Sbapt$DIALOG --clear --title "MENU BOX" "$@" \
29251839Sbapt        --menu "Hi, this is a menu box. You can use this to \n\
30251839Sbaptpresent a list of choices for the user to \n\
31251839Sbaptchoose. If there are more items than can fit \n\
32251839Sbapton the screen, the menu will be scrolled. \n\
33251839SbaptYou can use the UP/DOWN arrow keys, the first \n\
34251839Sbaptletter of the choice as a hot key, or the \n\
35251839Sbaptnumber keys 1-9 to choose an option.\n\
36251839SbaptTry it now!\n\n\
37251839Sbapt	Choose the OS you like:" 20 51 4 \
38251839Sbapt	--file $input 2> $output
39251839Sbapt
40251839Sbaptretval=$?
41251839Sbapt
42251839Sbapttempfile=$output
43251839Sbapt. ./report-tempfile
44