Comparison

plugins/mod_version.lua @ 3420:9be46a3466ef

mod_version: Make the command used to get OS version configurable
author Kim Alvefur <zash@zash.se>
date Sun, 01 Aug 2010 15:56:52 +0200
parent 2923:b7049746bd29
child 3421:d3852a4d37e2
comparison
equal deleted inserted replaced
3419:79e08dc3fd37 3420:9be46a3466ef
14 14
15 if not module:get_option("hide_os_type") then 15 if not module:get_option("hide_os_type") then
16 if os.getenv("WINDIR") then 16 if os.getenv("WINDIR") then
17 version = "Windows"; 17 version = "Windows";
18 else 18 else
19 local uname = io.popen("uname"); 19 local uname = io.popen(module:get_option("os_version_command") or "uname");
20 if uname then 20 if uname then
21 version = uname:read("*a"); 21 version = uname:read("*a");
22 else 22 else
23 version = "an OS"; 23 version = "an OS";
24 end 24 end