26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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
|
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
|
#
# NOTE: Indicate to the caller, if any, that we have failed.
#
exit 1
}
proc isScriptFile { fileName } {
switch -exact -- [file extension $fileName] {
.tcl -
.tk -
.test -
.eagle {
return [expr {
[file extension $fileName] eq ".tcl" || \
[file extension $fileName] eq ".tk" || \
[file extension $fileName] eq ".test" || \
return true
}
.xml {
set uri [object invoke Eagle._Constants.Xml ScriptNamespaceUri]
set data [readFile $fileName]
if {[string first $uri $data] != -1} then {
return true
}
}
}
[file extension $fileName] eq ".eagle"
}]
return false
}
proc isKeyRingFile { fileName } {
if {[file extension $fileName] ne ".eagle"} then {
return false
}
|