File: test-tclsh

package info (click to toggle)
jimtcl 0.73-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,760 kB
  • sloc: ansic: 120,467; sh: 4,106; tcl: 3,903; cpp: 1,671; makefile: 227
file content (20 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (33)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# A small Tcl script to verify that the chosen
# interpreter works. Sometimes we might e.g. pick up
# an interpreter for a different arch.
# Outputs the full path to the interpreter

if {[catch {info version} version] == 0} {
	# This is Jim Tcl
	if {$version >= 0.72} {
		# Ensure that regexp works
		regexp (a.*?) a
		puts [info nameofexecutable]
		exit 0
	}
} elseif {[catch {info tclversion} version] == 0} {
	if {$version >= 8.5 && ![string match 8.5a* [info patchlevel]]} {
		puts [info nameofexecutable]
		exit 0
	}
}
exit 1