blob: 1b4dd335060a8af1ee106535953feeafd97327dc (
plain) (
blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/sh
# $Id: buildlist2,v 1.8 2020/11/26 00:03:58 tom Exp $
. ./setup-vars
. ./setup-edit
count=0
ls -1 | while true
do
read filename
test -z "$filename" && break
case $filename in
*.*)
state=off
;;
*-*)
state=on
;;
*)
continue
;;
esac
case "x$DIALOGOPTS" in
*--no-items*|*--noitem*)
echo "$filename $state" >>$input
;;
*)
echo "$count $filename $state" >>$input
;;
esac
count=`expr $count + 1`
done
$DIALOG --title "BUILDLIST DEMO" --backtitle "A user-built list" \
--visit-items --scrollbar --separator "|" \
--buildlist "hello, this is a --buildlist..." 0 0 10 `cat "$input"` 2> $output
returncode=$?
tempfile=$output
. ./report-tempfile
|