24 |
shift $((OPTIND-1)) |
shift $((OPTIND-1)) |
25 |
text="$@" |
text="$@" |
26 |
|
|
27 |
[[ -z ${header} ]] && die "no header given" |
#[[ -z ${header} ]] && die "no header given" |
28 |
[[ -z ${text} ]] && die "no text given" |
[[ -z ${text} ]] && die "no text given" |
29 |
[[ -z ${height} ]] && height=0 |
[[ -z ${height} ]] && height=8 |
30 |
[[ -z ${width} ]] && width=0 |
[[ -z ${width} ]] && width=70 |
31 |
|
|
32 |
[[ -z ${OK_LABEL} ]] && OK_LABEL="Next" |
[[ -z ${OK_LABEL} ]] && OK_LABEL="Next" |
33 |
|
|
39 |
--msgbox "${text}" "${height}" "${width}" |
--msgbox "${text}" "${height}" "${width}" |
40 |
} |
} |
41 |
|
|
42 |
|
infobox() |
43 |
|
{ |
44 |
|
local header |
45 |
|
local text |
46 |
|
local height |
47 |
|
local width |
48 |
|
|
49 |
|
# very basic getops |
50 |
|
local OPTIND opt |
51 |
|
while getopts ":h:y:x:" opt |
52 |
|
do |
53 |
|
case ${opt} in |
54 |
|
h) header="${OPTARG}" ;; |
55 |
|
y) height="${OPTARG}" ;; |
56 |
|
x) width="${OPTARG}" ;; |
57 |
|
esac |
58 |
|
done |
59 |
|
shift $((OPTIND-1)) |
60 |
|
text="$@" |
61 |
|
|
62 |
|
#[[ -z ${header} ]] && die "no header given" |
63 |
|
[[ -z ${text} ]] && die "no text given" |
64 |
|
[[ -z ${height} ]] && height=3 |
65 |
|
[[ -z ${width} ]] && width=70 |
66 |
|
|
67 |
|
dialog \ |
68 |
|
--colors \ |
69 |
|
--title "${header}" \ |
70 |
|
--backtitle "${TITLE}" \ |
71 |
|
--infobox "${text}" "${height}" "${width}" |
72 |
|
} |
73 |
|
|
74 |
inputbox() |
inputbox() |
75 |
{ |
{ |
76 |
local header |
local header |
91 |
shift $((OPTIND-1)) |
shift $((OPTIND-1)) |
92 |
text="$@" |
text="$@" |
93 |
|
|
94 |
[[ -z ${header} ]] && die "no header given" |
#[[ -z ${header} ]] && die "no header given" |
95 |
[[ -z ${text} ]] && die "no text given" |
[[ -z ${text} ]] && die "no text given" |
96 |
[[ -z ${height} ]] && height=0 |
[[ -z ${height} ]] && height=0 |
97 |
[[ -z ${width} ]] && width=0 |
[[ -z ${width} ]] && width=0 |
124 |
shift $((OPTIND-1)) |
shift $((OPTIND-1)) |
125 |
text="$@" |
text="$@" |
126 |
|
|
127 |
[[ -z ${header} ]] && die "no header given" |
#[[ -z ${header} ]] && die "no header given" |
128 |
[[ -z ${text} ]] && die "no text given" |
[[ -z ${text} ]] && die "no text given" |
129 |
[[ -z ${height} ]] && height=0 |
[[ -z ${height} ]] && height=0 |
130 |
[[ -z ${width} ]] && width=0 |
[[ -z ${width} ]] && width=0 |
158 |
shift $((OPTIND-1)) |
shift $((OPTIND-1)) |
159 |
text="$@" |
text="$@" |
160 |
|
|
161 |
[[ -z ${header} ]] && die "no header given" |
#[[ -z ${header} ]] && die "no header given" |
162 |
[[ -z ${text} ]] && die "no text given" |
[[ -z ${text} ]] && die "no text given" |
163 |
[[ -z ${height} ]] && height=0 |
[[ -z ${height} ]] && height=0 |
164 |
[[ -z ${width} ]] && width=0 |
[[ -z ${width} ]] && width=70 |
165 |
|
|
166 |
dialog \ |
dialog \ |
167 |
--colors \ |
--colors \ |
190 |
shift $((OPTIND-1)) |
shift $((OPTIND-1)) |
191 |
text="$@" |
text="$@" |
192 |
|
|
193 |
[[ -z ${header} ]] && die "no header given" |
#[[ -z ${header} ]] && die "no header given" |
194 |
[[ -z ${text} ]] && die "no text given" |
[[ -z ${text} ]] && die "no text given" |
195 |
[[ -z ${height} ]] && height=0 |
[[ -z ${height} ]] && height=0 |
196 |
[[ -z ${width} ]] && width=0 |
[[ -z ${width} ]] && width=0 |