forked from mdejong/lzmaSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.tcl
More file actions
38 lines (26 loc) · 747 Bytes
/
update.tcl
File metadata and controls
38 lines (26 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Find all the .h or .c files in C/ and subdirs and copy over only those files
# that already exist in ../Classes/LZMASDK/
set cfiles [glob -type f -nocomplain C/*.{h,c} C/*/*.{h,c}]
foreach file $cfiles {
#puts "file = $file"
set tail [file tail $file]
set path [file join .. Classes LZMASDK $tail]
set copied 0
if {[file exists $path]} {
#puts "EXISTS $path"
puts "cp $file $path"
file copy -force $file $path
set copied 1
}
# Also check ../Classes/LZMASDK/Util/7z
set path [file join .. Classes LZMASDK Util 7z $tail]
if {[file exists $path]} {
#puts "EXISTS $path"
puts "cp $file $path"
file copy -force $file $path
set copied 1
}
if {!$copied} {
puts "IGNORE $file"
}
}