From: cas Date: Fri, 27 Sep 2002 18:04:22 +0000 (+0000) Subject: Initial revision X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=24949dc01192fd04f5f1a9021dd6d61047e20157;p=occt-wok.git Initial revision --- diff --git a/src/WOKStep/WOKStep_LibRename.tcl b/src/WOKStep/WOKStep_LibRename.tcl new file mode 100755 index 0000000..24fc7b5 --- /dev/null +++ b/src/WOKStep/WOKStep_LibRename.tcl @@ -0,0 +1,42 @@ +proc WOKStep_LibRename:AdmFileType {} { + return dbadmfile; +} + +proc WOKStep_LibRename:OutputDirTypeName {} { + return dbtmpdir; +} + +proc WOKStep_LibRename:HandleInputFile { ID } { + scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name + + if { [file extension $name] == ".so" } { + + return 1; + + } + + return 0; + +} + + +proc WOKStep_LibRename:Execute { theunit args } { + foreach ID $args { + + scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name + + set rootname [file rootname $name] + set ext [file extension $name] + + if { [regsub -all {\.} $rootname {_} newname] > 0 } { + msgprint -i -c "WOKStep_JavaCompile:Execute" "renaming $rootname to $newname$ext" + set libname [woklocate -p $ID] + #file rename -force $libname [file dirname $libname]/$newname$ext + if [catch {exec mv -f $libname [file dirname $libname]/$newname$ext } status ] { + msgprint -e -c "WOKStep_LibRename:Execute" $status + return 1 + } + } + } + return 0; +}