summaryrefslogtreecommitdiff
path: root/rc/bin/inst/startwin
blob: 9da63bbee2505d16833cc1bc67b9f2ddc3c3ced0 (plain)
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
43
44
45
#!/bin/rc

fn time { date | sed 's/.........$//'}

rm -f /srv/log

if(~ $#* 2) {
	wid=$1
	ht=$2
} 
if not {
	scr=(`{cat /dev/draw/new >[2]/dev/null || status=''})
	wid=$scr(7)
	ht=$scr(8)
}

if(test $ht -gt 800)
	ht=800

if(test $wid -gt 800)
	wid=800

statwid=`{hoc -e $wid^'*.2'}
if(test $statwid -lt 180)
	statwid=180
if(test $statwid -gt 300)
	statwid=300

logwid=`{hoc -e $wid^-$statwid}
if(test $logwid -gt 1000)
	logwid=1000

loght=`{hoc -e $ht^'*.25'}
if(test $loght -lt 130)
	loght=130

textht=`{hoc -e $ht^-$loght}

window 0,$textht,$statwid,$ht stats -lmisce
window 0,0,^`{hoc -e $logwid+$statwid}^,$textht inst/mainloop
rm -f /srv/log
window $statwid,$textht,^`{hoc -e $logwid+$statwid}^,$ht 'echo 2 >/srv/log; while(){sleep 1000}'
while(! test -f /srv/log)
	sleep 1
log `{time} Installation process started