@@ -1,15 +1,19 @@ #! /usr/bin/env tclsh -if {[llength $argv] != 2} { - puts stderr "Usage: installvfs.tcl " +set opt_compression 1 +if {[llength $argv] < 2} { + puts stderr "Usage: installvfs.tcl \[\]" 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 { @@ -19,10 +23,11 @@ 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]