blob: e3ef974482180855c6d30e9ea845d74be8324a44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
cat <<EOF > $1
local pcall, dofile, _G = pcall, dofile, _G
module "luci.version"
if pcall(dofile, "/etc/openwrt_release") and _G.DISTRIB_DESCRIPTION then
distname = ""
distversion = _G.DISTRIB_DESCRIPTION
if _G.DISTRIB_REVISION then
distrevision = _G.DISTRIB_REVISION
if not distversion:find(distrevision) then
distversion = distversion .. " " .. distrevision
end
end
else
distname = "OpenWrt"
distversion = "Development Snapshot"
end
luciname = "${3:-LuCI}"
luciversion = "${2:-Git}"
EOF
|