Subversion Repositories Koakuma

Rev

Rev 14 | Rev 18 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14 Rev 15
Line 1... Line 1...
1
#!/usr/bin/env tclsh
1
#!/usr/bin/env tclsh
2
# $Id: koakuma.cgi.in 14 2024-10-02 06:41:51Z nishi $
2
# $Id: koakuma.cgi.in 15 2024-10-02 06:42:12Z nishi $
3
 
3
 
4
set KOAKUMA_VERSION "1.00"
4
set KOAKUMA_VERSION "1.00"
5
set components ""
5
set components ""
6
 
6
 
7
chan configure stdout -buffering none
7
chan configure stdout -buffering none
Line 608... Line 608...
608
				tputs "[html_escape "$has_project"]"
608
				tputs "[html_escape "$has_project"]"
609
				add_toc "Details"
609
				add_toc "Details"
610
				tputs	"<table border=\"0\">"
610
				tputs	"<table border=\"0\">"
611
				tputs	"	<tr>"
611
				tputs	"	<tr>"
612
				tputs	"		<th>"
612
				tputs	"		<th>"
613
				tputs	"			Last run"
613
				tputs	"			Status"
614
				tputs	"		</th>"
614
				tputs	"		</th>"
615
				tputs	"		<td>"
615
				tputs	"		<td>"
616
				if { [file exists "@@PREFIX@@/lib/koakuma/db/data/$projname/lastrun"] } {
616
				if { [file exists "@@PREFIX@@/lib/koakuma/db/data/$projname/build.lock"] } {
617
					set fid [open "@@PREFIX@@/lib/koakuma/db/data/$projname/lastrun" "r"]
617
					set fid [open "@@PREFIX@@/lib/koakuma/db/data/$projname/build.loc" "r"]
618
					set date "[clock format "[gets $fid]" -format "%a %b %d %H:%M:%S %Z %Y"]"
618
					if { [file exists "/proc/[gets $fid]"] } {
-
 
619
						tputs "Running"
-
 
620
					} else {
-
 
621
						tputs "Idle"
-
 
622
					}
619
					close $fid
623
					close $fid
620
					tputs "$date"
-
 
621
				} else {
624
				} else {
622
					tputs "No builds yet"
625
					tputs "Idle"
623
				}
626
				}
624
				tputs	"			"
627
				tputs	"			"
625
				tputs	"		</td>"
628
				tputs	"		</td>"
626
				tputs	"	</tr>"
629
				tputs	"	</tr>"
627
				tputs	"	<tr>"
630
				tputs	"	<tr>"
628
				tputs	"		<th>"
631
				tputs	"		<th>"
629
				tputs	"			Status"
632
				tputs	"			Last run"
630
				tputs	"		</th>"
633
				tputs	"		</th>"
631
				tputs	"		<td>"
634
				tputs	"		<td>"
632
				if { [file exists "@@PREFIX@@/lib/koakuma/db/data/$projname/build.lock"] } {
635
				if { [file exists "@@PREFIX@@/lib/koakuma/db/data/$projname/lastrun"] } {
633
					set fid [open "@@PREFIX@@/lib/koakuma/db/data/$projname/build.loc" "r"]
636
					set fid [open "@@PREFIX@@/lib/koakuma/db/data/$projname/lastrun" "r"]
634
					if { [file exists "/proc/[gets $fid]"] } {
637
					set date "[clock format "[gets $fid]" -format "%a %b %d %H:%M:%S %Z %Y"]"
635
						tputs "Running"
-
 
636
					} else {
-
 
637
						tputs "Idle"
-
 
638
					}
-
 
639
					close $fid
638
					close $fid
-
 
639
					tputs "$date"
640
				} else {
640
				} else {
641
					tputs "Idle"
641
					tputs "No builds yet"
642
				}
642
				}
643
				tputs	"			"
643
				tputs	"			"
644
				tputs	"		</td>"
644
				tputs	"		</td>"
645
				tputs	"	</tr>"
645
				tputs	"	</tr>"
646
				tputs	"	<tr>"
646
				tputs	"	<tr>"