xref: /freebsd/contrib/bsddialog/examples_utility/mixedgauge.sh (revision 2008043f386721d58158e37e0d7e50df8095942d)
1#!/bin/sh
2#-
3# SPDX-License-Identifier: CC0-1.0
4#
5# Written in 2021 by Alfonso Sabato Siciliano.
6#
7# To the extent possible under law, the author has dedicated all copyright
8# and related and neighboring rights to this software to the public domain
9# worldwide. This software is distributed without any warranty, see:
10#	<http://creativecommons.org/publicdomain/zero/1.0/>.
11
12perc=0
13mainperc=50
14while [ $perc -le 100 ]
15do
16	./bsddialog --sleep 1 --title " mixedgauge "    \
17		--mixedgauge "Example..." 20 45  $mainperc \
18		"Label  1"   " -1"  \
19		"Label  2"   " -2"  \
20		"Label  3"   " -3"  \
21		"Label  4"   " -4"  \
22		"Label  5"   " -5"  \
23		"Label  6"   " -6"  \
24		"Label  7"   " -7"  \
25		"Label  8"   " -8"  \
26		"Label  9"   " -9"  \
27		"Label 10"   " -10" \
28		"Label 11"   " -11" \
29		"Label  X"   $perc
30
31	perc=`expr $perc + 20`
32	mainperc=`expr $mainperc + 10`
33done
34