Merge pull request #669 from hnyman/git-branch
[project/luci.git] / modules / luci-base / src / mkversion.sh
1 #!/bin/sh
2
3 cat <<EOF > $1
4 local pcall, dofile, _G = pcall, dofile, _G
5
6 module "luci.version"
7
8 if pcall(dofile, "/etc/openwrt_release") and _G.DISTRIB_DESCRIPTION then
9         distname    = ""
10         distversion = _G.DISTRIB_DESCRIPTION
11 else
12         distname    = "OpenWrt"
13         distversion = "Development Snapshot"
14 end
15
16 luciname    = "${3:-LuCI}"
17 luciversion = "${2:-Git}"
18 EOF