Diff

Differences From Artifact [01a4e2e7f2]:

To Artifact [b17724e7c3]:


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
...
113
114
115
116
117
118
119
120


121

set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]
if {[lindex $argv 2] != ""} {
	set opt_compression [lindex $argv 2]
}

# Determine what storage mechanism is being used
## This logic must be duplicated from "kitInit.c"
set fd [open Makefile r]
set data [read $fd]
close $fd

if {[string match "*KIT_STORAGE_ZIP*" $data]} {
	set tclKitStorage zip
}
if {[string match "*KIT_STORAGE_MK4*" $data]} {
	set tclKitStorage mk4
}

if {![info exists tclKitStorage]} {
	if {[string match "*KIT_INCLUDES_MK4TCL*" $data]} {
		set tclKitStorage mk4
	} else {
		set tclKitStorage zip
	}
}

# Define procedures
proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
................................................................................
		if {[catch {
			close $zipfd
		} err]} {
			puts stderr "Error while updating executable: $err"

			exit 1
		}
	}


}








<
|









<
<
|
|
<
<
<







 








>
>
|
>
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
...
107
108
109
110
111
112
113
114
115
116
117
118
set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]
if {[lindex $argv 2] != ""} {
	set opt_compression [lindex $argv 2]
}

# Determine what storage mechanism is being used

set fd [open Makefile.common r]
set data [read $fd]
close $fd

if {[string match "*KIT_STORAGE_ZIP*" $data]} {
	set tclKitStorage zip
}
if {[string match "*KIT_STORAGE_MK4*" $data]} {
	set tclKitStorage mk4
}


if {[string match "*KIT_STORAGE_CVFS*" $data]} {
	set tclKitStorage cvfs



}

# Define procedures
proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
................................................................................
		if {[catch {
			close $zipfd
		} err]} {
			puts stderr "Error while updating executable: $err"

			exit 1
		}
	}
	"cvfs" {
		# No-op
	}
}