OpenCores
URL https://opencores.org/ocsvn/pavr/pavr/trunk

Subversion Repositories pavr

[/] [pavr/] [trunk/] [tools/] [backup/] [build_devel.tcl] - Blame information for rev 8

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 doru
# Procedure for printing text.
2
proc Print {txt} {
3
}
4
 
5
# Procedure for cleaning up the devel structure.
6
# Dive into devel subdirectories and execute any file named `clean.bat'.
7
proc CleanDevelStructure {crtDir} {
8
   if {[catch {set cleanFilesList [glob -directory $crtDir clean.bat]} tmpMsg]} {
9
   } else {
10
      foreach {cleanFile} $cleanFilesList {
11
         Print "Cleaning $crtDir ...\n"
12
         set initialDir "[pwd]"
13
         cd "$crtDir"
14
         catch {exec clean.bat} tmpMsg
15
         cd "$initialDir"
16
         if [string equal $tmpMsg ""] {
17
            Print "$tmpMsg \n"
18
         }
19
      }
20
   }
21
   if {[catch {set dirsList [glob -directory $crtDir -type d *]} tmpMsg]} {
22
   } else {
23
      foreach {dirToSearchIn} $dirsList {
24
         CleanDevelStructure "$dirToSearchIn"
25
      }
26
   }
27
}
28
 
29
# -------------------------------------
30
# Set source and destination paths.
31
set src             ../..
32
set dst             pavr
33
set archiveFileName pavr-devel
34
 
35
# Delete existent devel directory structure.
36
Print "Deleting existing devel directory structure ...\n"
37
file delete -force $dst
38
 
39
# Copy existent structure to devel structure.
40
Print "Creating devel directory structure ...\n"
41
file mkdir $dst
42
 
43
file copy  $src/doc $dst
44
file copy  $src/src $dst
45
file copy  $src/test $dst
46
 
47
file mkdir $dst/tools/
48
 
49
file copy  $src/tools/build_vhdl_hdr  $dst/tools
50
file copy  $src/tools/build_vhdl_test $dst/tools
51
file copy  $src/tools/common          $dst/tools
52
 
53
file mkdir $dst/tools/backup
54
file copy $src/tools/backup/build_devel.tcl        $dst/tools/backup
55
file copy $src/tools/backup/build_release_chm.tcl  $dst/tools/backup
56
file copy $src/tools/backup/build_release_html.tcl $dst/tools/backup
57
 
58
CleanDevelStructure "$dst"
59
 
60
Print "Archiving...\n"
61
catch {exec wzzip -rP -ybc $archiveFileName $dst} tmpMsg
62
 
63
Print "Deleting temporary devel directory structure...\n"
64
file delete -force $dst
65
 
66
exit

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.