summaryrefslogtreecommitdiff
path: root/rc/bin/inst/startwin
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-04-12 15:53:55 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-04-12 15:53:55 +0000
commit67e93d6a0a4f15192638e131413b9d64c4269c76 (patch)
tree88fd1d17c4be283683a96ced44159e3ce6b6f2f7 /rc/bin/inst/startwin
parent7208d528bd42f981f2535403f72e4c0d7d8df643 (diff)
downloadplan9front-67e93d6a0a4f15192638e131413b9d64c4269c76.tar.xz
updating cwfs and moving installer in /rc/bin
Diffstat (limited to 'rc/bin/inst/startwin')
-rwxr-xr-xrc/bin/inst/startwin46
1 files changed, 46 insertions, 0 deletions
diff --git a/rc/bin/inst/startwin b/rc/bin/inst/startwin
new file mode 100755
index 000000000..bcd542890
--- /dev/null
+++ b/rc/bin/inst/startwin
@@ -0,0 +1,46 @@
+#!/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 $statwid,$textht,^`{hoc -e $logwid+$statwid}^,$ht tailfsrv
+window 0,0,^`{hoc -e $logwid+$statwid}^,$textht inst/mainloop
+
+while(! test -f /srv/log)
+ sleep 1
+
+log `{time} Installation process started