Menu

[r3]: / cmp / PkgLib / Rec.tcl  Maximize  Restore  History

Download this file

63 lines (46 with data), 1.2 kB

 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
##
## Compiler2 - PkgLib - Rec
##
## (C) IPN - Ingenieurbuero fuer Praezisionsnumerik
##
## Dipl.-Ing. Andreas Otto
## Ulmenstrasse 3
## D-34289 Zierenberg
## mailto:aotto@t-online.de
## http://tclcompiler.sourceforge.net
##
## Alle Rechte vorbehalten
##
package require StdLib
package require FileLib
namespace eval ::PkgLib::Rec {
namespace import ::PkgLib::Db::*
}
proc ::PkgLib::Rec::Msg { Str } {
puts stdout "PKG REC MSG: $Str"
}
proc ::PkgLib::Rec::ErrorN { args } {
lappend args {please check your environment}
::StdLib::ErrorN [ list PKG REC ] $args
}
##
## --------------------------------------------------------------------------------------
##
proc ::PkgLib::Rec::Main { pKG } {
set DIR [ file join [ ::PkgLib::COMPILER_HOME ] var pkg install ]
set LPkg {}
## 1) get all packages
::FileLib::Push-SKIP {}
foreach D [ ::FileLib::GetSubDirs $DIR ] {
set Pkg [ file tail $D ]
lappend LPkg $Pkg
}
::FileLib::Pop-SKIP
## 2) filter all packages
foreach P [ FilterList [lsort $LPkg] $pKG ] {
if {[ PkgIsAvailable $P ]} continue
Msg "recover \"$P\""
::PkgLib::Db::Add $P
::PkgLib::Db::Info $P Force yes
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.