-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy_all_packed_ips.tcl
69 lines (52 loc) · 1.2 KB
/
copy_all_packed_ips.tcl
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
proc copy_all_packed_ips { DEST_FOLDER } {
#set WD [pwd]
#set DEST_FOLDER D:/Work/hdlbsp-master/vendor/AnalogDevices/vivado/library
#set DEST_FOLDER $WD
set folder_list [glob -types d *]
foreach dir $folder_list {
puts "$dir"
cd $dir
if {[catch {set files_list [glob *]}]} {
cd ..
continue
}
foreach file $files_list {
set idx [string first .zip $file 1]
if {$idx != -1} {
file copy -force $file $DEST_FOLDER/$file
puts $file
}
}
cd ..
# Don't remove these folders
if {$dir=="common"} {continue}
if {$dir=="interfaces"} {continue}
if {$dir=="prcfg"} {continue}
if {$dir=="scripts"} {continue}
if {$dir=="xilinx"} {continue}
if {$dir=="jesd204"} {continue}
if {$dir=="spi_engine"} {continue}
file delete -force -- $dir
}
}
cd hdl
# Move main library core zips
cd library
set DEST [pwd]
puts $DEST
copy_all_packed_ips $DEST
# Move Xilinx core zips
cd xilinx
set DEST [pwd]
copy_all_packed_ips $DEST
cd ..
# Move jesd204 core zips
cd jesd204
set DEST [pwd]
copy_all_packed_ips $DEST
cd ..
# Move spi_engine core zips
cd spi_engine
set DEST [pwd]
copy_all_packed_ips $DEST
cd ../../..