0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-11-25 00:49:41 +01:00
sqlite/autosetup/autosetup-test-tclsh
stephan 6219872845 Initial pristine autosetup bits.
FossilOrigin-Name: dfb1e7f0cce9bc79c43eee7208cad0e2df562b2bc9705d3a36fd78f86c75495b
2024-09-24 21:08:49 +00:00

21 lines
531 B
Plaintext

# 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