Commit 24aa07a7 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(read_versions): New function, extracted from ../lyskomd.0/01.exp.

parent b2ec3688
...@@ -303,3 +303,25 @@ proc holl {str} { ...@@ -303,3 +303,25 @@ proc holl {str} {
return "[string length $str]H$str" return "[string length $str]H$str"
} }
proc read_versions {} {
# Read $top_srcdir/versions and store the versions in global variables.
global top_srcdir
global protocol_a_level
global server_software
global server_version
global server_compat_version
set f [open "$top_srcdir/versions"]
while {[gets $f line] >= 0} {
if {[lindex $line 0] == "PROTOCOL-A-LEVEL:"} {
set protocol_a_level [lindex $line 1]
} elseif {[lindex $line 0] == "SERVER-SOFTWARE:"} {
set server_software [lindex $line 1]
} elseif {[lindex $line 0] == "SERVER-VERSION:"} {
set server_version [lindex $line 1]
} elseif {[lindex $line 0] == "SERVER-COMPAT-VERSION:"} {
set server_compat_version [lindex $line 1]
}
}
close $f
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment