summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/src/mkversion.sh
blob: 33c7a3ffea5c44c505e207205af190b2973dcfbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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
else
	distname    = "OpenWrt"
	distversion = "Development Snapshot"
end

luciname    = "${3:-LuCI}"
luciversion = "${2:-Git}"
EOF