Diff

Differences From Artifact [9c5d7ceaab]:

To Artifact [848dac55a9]:


1
2

3
4
5
6
7
8
9
10



11
12
13
14
15
16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
#! /usr/bin/env tclsh


if {[llength $argv] != 2} {
	puts stderr "Usage: installvfs.tcl <kitfile> <vfsdir>"

	exit 1
}

set kitfile [lindex $argv 0]
set vfsdir [lindex $argv 1]




if {[catch {
	package require vfs::mk4
}]} {
	catch {
		load "" vfs
		load "" Mk4tcl

		source [file join $vfsdir lib/vfs/vfsUtils.tcl]
		source [file join $vfsdir lib/vfs/vfslib.tcl]
		source [file join $vfsdir lib/vfs/mk4vfs.tcl]
	}
}


proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
			set ofd [open $destfile w]



>
|
|






>
>
>













>







1
2
3
4
5
6
7
8
9
10
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
#! /usr/bin/env tclsh

set opt_compression 1
if {[llength $argv] < 2} {
	puts stderr "Usage: installvfs.tcl <kitfile> <vfsdir> \[<enable_compression>\]"

	exit 1
}

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

if {[catch {
	package require vfs::mk4
}]} {
	catch {
		load "" vfs
		load "" Mk4tcl

		source [file join $vfsdir lib/vfs/vfsUtils.tcl]
		source [file join $vfsdir lib/vfs/vfslib.tcl]
		source [file join $vfsdir lib/vfs/mk4vfs.tcl]
	}
}
set mk4vfs::compress $opt_compression

proc copy_file {srcfile destfile} {
	switch -glob -- $srcfile {
		"*.tcl" - "*.txt" {
			set ifd [open $srcfile r]
			set ofd [open $destfile w]