freebsd-nq/contrib/dialog/samples/gauge2
Nathan Whitehorn 4c8945a06b Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.

__FreeBSD_version is now 900030.

Discussed on:	-current
Approved by:	core
Obtained from:	http://invisible-island.net/dialog
2011-01-12 14:55:02 +00:00

29 lines
468 B
Bash
Executable File

#!/bin/sh
# $Id: gauge2,v 1.8 2010/01/13 10:26:52 tom Exp $
# The original dialog program assumed the first line after the first "XXX"
# was a percentage value (compare with "gauge" script).
. ./setup-vars
(echo "10" ; sleep 2 ;
cat <<"EOF"
XXX
The new
\n
message
XXX
20
EOF
sleep 2;
echo "75" ; sleep 1
echo "100") | \
$DIALOG --title "GAUGE" "$@" --gauge "Hi, this is a gauge widget" 10 40 0
if [ "$?" = $DIALOG_ESC ] ; then
echo ""
echo "Box closed !"
fi