Diff

Differences From Artifact [92bcf20d68]:

To Artifact [3c4d307b06]:


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
...
159
160
161
162
163
164
165

166
167
168



169
170
171
172












173
174
175
176
177
178
179
set queue "${queue}.old"

set fd [open $queue r]
set data [read $fd]
close $fd

set ::env(TCLKIT) "/home/rkeene/bin/tclkit"





















foreach line [split $data "\n"] {
	if {$line == ""} {
		continue
	}

	unset -nocomplain buildinfo


	array set buildinfo $line

	set outfile [file join $outdir $buildinfo(key) $buildinfo(filename)]




	# Skip if build completed
	if {[file exists $outfile]} {
		continue
	}

	# Skip if build failed
................................................................................
	}

	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 {
				continue
			}
		}













		if {[file exists $file]} {
			file rename $file $outfile

			break
		}
	}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>




>
>
>







 







>



>
>
>




>
>
>
>
>
>
>
>
>
>
>
>







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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
set queue "${queue}.old"

set fd [open $queue r]
set data [read $fd]
close $fd

set ::env(TCLKIT) "/home/rkeene/bin/tclkit"

proc handleSDK {workdir input output} {
	set workdir [file join $workdir "sdk-rewrite"]
	set dirNewName [regsub {\.tar\.gz$} [file tail $output] {}]

	file mkdir $workdir
	exec gzip -dc $input | tar -C $workdir -xf -

	set dirName [glob -nocomplain -directory $workdir *]
	if {[llength $dirName] != 1} {
		return -code error "Multiple directories found: $dirName"
	}

	set dirName [lindex $dirName 0]

	file rename $dirName [file join $workdir $dirNewName]
	exec tar -C $workdir -cf - $dirNewName | gzip -9c > [file join $workdir sdk.tar.gz]

	file copy [file join $workdir sdk.tar.gz] $output
}

foreach line [split $data "\n"] {
	if {$line == ""} {
		continue
	}

	unset -nocomplain buildinfo
	unset -nocomplain outsdkfile

	array set buildinfo $line

	set outfile [file join $outdir $buildinfo(key) $buildinfo(filename)]
	if {[info exists buildinfo(sdkfilename)]} {
		set outsdkfile [file join $outdir $buildinfo(key) $buildinfo(sdkfilename)]
	}

	# Skip if build completed
	if {[file exists $outfile]} {
		continue
	}

	# Skip if build failed
................................................................................
	}

	catch {
		exec grep ^ {*}[lsort -dictionary [glob */build.log]] >> "${outfile}.log"
	}

	foreach file [list tclkit-$buildinfo(tcl_version) {*}[glob -nocomplain libtclkit*]] {
		set isSDK false
		switch -glob -- $file {
			"*.dylib" - "*.so" - "*.sl" - "*.dll" { }
			"tclkit-*" {}
			"libtclkit-sdk-*.tar.gz" {
				set isSDK true
			}
			default {
				continue
			}
		}

		if {$isSDK} {
			if {[info exists outsdkfile]} {
				if {[catch {
					handleSDK $workdir $file $outsdkfile
				}]} {
					puts stderr "Error creating SDK: $::errorInfo"
				}
			}

			continue
		}

		if {[file exists $file]} {
			file rename $file $outfile

			break
		}
	}