Command wgenproj will not override any more existing custom.bat (.sh) file in the current workbench.
Corrected -force argument and handling of copy failure
close $anEnvFile
if { "$::tcl_platform(platform)" == "windows" } {
- file copy -force -- "$::env(WOKHOME)/site/custom.bat" "$aBox/custom.bat"
+ catch {file copy -- "$::env(WOKHOME)/site/custom.bat" "$aBox/custom.bat"}
file copy -force -- "$::env(WOKHOME)/lib/templates/draw.bat" "$aBox/draw.bat"
file copy -force -- "$::env(WOKHOME)/lib/templates/msvc.bat" "$aBox/msvc.bat"
} else {
- file copy -force -- "$::env(WOKHOME)/site/custom.sh" "$aBox/custom.sh"
+ catch {file copy -- "$::env(WOKHOME)/site/custom.sh" "$aBox/custom.sh"}
}
}