1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00
openmptcprouter-feeds/luci-base/src/mkversion.sh
2018-01-23 15:36:03 +01:00

24 lines
534 B
Bash
Executable file

#!/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,1,true) then
distversion = distversion .. " " .. distrevision
end
end
else
distname = "OpenWrt"
distversion = "Development Snapshot"
end
luciname = "${3:-LuCI}"
luciversion = "${2:-Git}"
EOF