0022904: Clean up sccsid variables
[occt.git] / src / ExprIntrp / ExprIntrp_Replace.tcl
1 proc ExprIntrp_Replace:AdmFileType {} {
2     return "dbadmfile";
3 }
4
5 proc ExprIntrp_Replace:OutputDirTypeName {} {
6     return "dbtmpfile";
7 }
8
9
10 proc ExprIntrp_Replace:HandleInputFile { ID } { 
11
12     scan $ID "%\[^:\]:%\[^:\]:%\[^:\]"  unit type name
13     
14     switch $name {
15          ExprIntrp.tab.c  {return 1;} 
16         default {
17             return 0;
18         }
19     }
20 }
21
22 proc ExprIntrp_Replace:Execute { unit args } {
23     
24     msgprint -i -c "ExprIntrp_Replace::Execute" "Copying of ExprIntrp includes  $unit $args "
25
26     global tcl_interactive
27
28     set tcl_interactive 1
29     package require Wokutils
30
31
32     if { [wokparam -e %Station $unit] != "wnt" } {
33         set copycmd "cp -p "
34         set replstr "/"
35     } else {
36         set copycmd "cmd /c copy"
37         set replstr "\\\\\\\\"
38     }
39     
40
41         set sourcename ExprIntrp.tab.c
42         set name       ExprIntrp.tab.c
43
44         set source    [woklocate -p ExprIntrp:source:$sourcename     [wokinfo -N $unit]]
45         set vistarget [woklocate -p ExprIntrp:privinclude [wokinfo -N $unit]]$name
46 #       set target    [wokinfo   -p ExprIntrp:privinclude:$name [wokinfo -N $unit]]
47 msgprint -i -c "$source "
48         regsub -all "/" " $source $vistarget" $replstr  TheArgs
49
50         msgprint -i -c "ExprIntrp_Replace::Execute" "Copy $source to $vistarget"
51         if { [file exist $vistarget] && [wokparam -e %Station ] != "wnt" } {
52                 eval exec "chmod u+w $vistarget"
53         }
54         eval exec "$copycmd $TheArgs"
55
56     return 0;
57 }
58
59
60