summaryrefslogtreecommitdiff
path: root/autosetup/autosetup-test-tclsh
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2019-11-20 20:25:37 +0100
committerDidier Raboud <odyx@debian.org>2019-11-20 20:25:37 +0100
commit052cee686ea886c16b59dcabb5a04b2e6d390ade (patch)
tree0f0dc73676b4d94e58c5b0d77e5c5df5192aaf75 /autosetup/autosetup-test-tclsh
parent352d61e6661d45100eeea2c960b027be01b7fc37 (diff)
parent0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6 (diff)
Merge tag 'upstream/0.79' into upstream/latest-repack
Diffstat (limited to 'autosetup/autosetup-test-tclsh')
-rw-r--r--autosetup/autosetup-test-tclsh20
1 files changed, 20 insertions, 0 deletions
diff --git a/autosetup/autosetup-test-tclsh b/autosetup/autosetup-test-tclsh
new file mode 100644
index 0000000..75126d2
--- /dev/null
+++ b/autosetup/autosetup-test-tclsh
@@ -0,0 +1,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