1
2
3
4
5
6
7
8
9
10
11
|
#! /usr/bin/env tclsh
set queue "/home/rkeene/devel/kitcreator/build/web/queue"
set outdir "/web/customers/kitcreator.rkeene.org/kits"
if {![file exists "${queue}.old"]} {
if {![file exists $queue]} {
exit 0
}
file rename "$queue" "${queue}.old"
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
|
#! /usr/bin/env tclsh
set queue "/home/rkeene/devel/kitcreator/build/web/queue"
set outdir "/web/customers/kitcreator.rkeene.org/kits"
set builddir "/tmp/kitcreator-web/builds"
if {![file exists "${queue}.old"]} {
if {![file exists $queue]} {
exit 0
}
file rename "$queue" "${queue}.old"
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
}
# Skip if build failed
if {[file exists $outfile.buildfail]} {
continue
}
set workdir [file join $outdir $buildinfo(key) build]
file delete -force $workdir
file mkdir $workdir
cd $workdir
set fd [open ../buildinfo w]
puts $fd [array get buildinfo]
close $fd
set tarball kitcreator-${buildinfo(kitcreator_version)}.tar.gz
exec wget -q -O $tarball http://kitcreator.rkeene.org/fossil/tarball/${tarball}?uuid=${buildinfo(kitcreator_version)}
exec gzip -dc $tarball | tar -xf -
cd kitcreator-${buildinfo(kitcreator_version)}
set script "./build/make-kit-${buildinfo(platform)}"
set args [list]
set ::env(KITCREATOR_PKGS) " [join $buildinfo(packages) " "] "
foreach {option value} $buildinfo(options) {
|
|
|
>
>
>
>
|
>
>
|
|
|
>
>
>
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
}
# Skip if build failed
if {[file exists $outfile.buildfail]} {
continue
}
# Set the build directory
file delete -force -- $builddir
set workdir [file join $builddir $buildinfo(key) build]
file mkdir $workdir
cd $workdir
# Find place to store build info
set keydir [file join $outdir $buildinfo(key)]
file mkdir $keydir
set fd [open [file join $keydir buildinfo] w]
puts $fd [array get buildinfo]
close $fd
set tarball kitcreator-${buildinfo(kitcreator_version)}.tar.gz
if {[catch {
exec wget -q -O $tarball http://kitcreator.rkeene.org/fossil/tarball/${tarball}?uuid=${buildinfo(kitcreator_version)}
exec gzip -dc $tarball | tar -xf -
cd kitcreator-${buildinfo(kitcreator_version)}
}]} {
continue
}
set script "./build/make-kit-${buildinfo(platform)}"
set args [list]
set ::env(KITCREATOR_PKGS) " [join $buildinfo(packages) " "] "
foreach {option value} $buildinfo(options) {
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
}
catch {
exec {*}$cmd >> "${outfile}.log" 2>@1
}
catch {
exec grep ^ {*}[glob */build.log] >> "${outfile}.log"
}
foreach file [list tclkit-$buildinfo(tcl_version) {*}[glob -nocomplain libtclkit*]] {
switch -glob -- $file {
"*.dylib" - "*.so" - "*.sl" - "*.dll" { }
"tclkit-*" {}
default {
|
|
|
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
}
catch {
exec {*}$cmd >> "${outfile}.log" 2>@1
}
catch {
exec grep ^ {*}[lsort -dictionary [glob */build.log]] >> "${outfile}.log"
}
foreach file [list tclkit-$buildinfo(tcl_version) {*}[glob -nocomplain libtclkit*]] {
switch -glob -- $file {
"*.dylib" - "*.so" - "*.sl" - "*.dll" { }
"tclkit-*" {}
default {
|