home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
setup.tcl
< prev
next >
Wrap
Text File
|
1996-08-12
|
2KB
|
50 lines
# setup.tcl (generated by make_pc_export <V1.1>)
#
set icase [path_name concat [lindex [glob ~] 0] icase]
# --------------------------------------------------------
# the menu customization is special, ask user for guidance
# --------------------------------------------------------
if { [file exists [path_name concat $icase desk.mnu]] } {
set answer ""
while { $answer != "a" && $answer != "o" && $answer != "n" } {
puts -nonewline "desk.mnu exists, a(ppend), o(verwrite) or n(o change)? "
gets stdin answer
}
if { $answer == "o" } {
# -------------------------------------------
# Overwrite, just copy the file using BasicFS
# -------------------------------------------
BasicFS::copyFile desk.mnu [path_name concat $icase desk.mnu]
} elseif { $answer == "a" } {
# --------------------------------------------
# Append, add it to the existing customization
# --------------------------------------------
set file_name [path_name concat $icase desk.mnu]
set in [open desk.mnu r]
set out [open [path_name concat $icase desk.mnu] a]
puts $out ""
while { [gets $in line] >= 0 } {
puts $out $line
}
flush $out
close $in
close $out
}
# ---------------------------------------------
# Else do nothing, leave existing customization
# ---------------------------------------------
} else {
BasicFS::copyFile desk.mnu [path_name concat $icase desk.mnu]
}
BasicFS::copyFile checkall.tcl [path_name concat $icase check_all.tcl]
BasicFS::copyFile all2file.tcl [path_name concat $icase export_all_to_file.tcl]
BasicFS::copyFile exp2dir.tcl [path_name concat $icase export_to_directory.tcl]
BasicFS::copyFile exp2file.tcl [path_name concat $icase export_to_file.tcl]
BasicFS::copyFile fchooser.tcl [path_name concat $icase file_chooser.tcl]
BasicFS::copyFile smalllib.tcl [path_name concat $icase small_library.tcl]
BasicFS::copyFile getsrc.tcl [path_name concat $icase get_export_source.tcl]
BasicFS::copyFile et.tcl [path_name concat $icase et.tcl]