2361e5f3b9ab19086e8f2b3e855aa2fcf5528ccc
[project/luci.git] / build / mkversion.sh
1 #!/bin/sh
2
3 local variant
4
5 if [ "${4%%/*}" = "branches" ]; then
6 variant="LuCI ${4##*[-/]} Branch"
7 elif [ "${4%%/*}" = "tags" ]; then
8 variant="LuCI ${4##*[-/]} Release"
9 else
10 variant="LuCI Trunk"
11 fi
12
13 cat <<EOF > $1
14 module "luci.version"
15
16 distname = "${2:-OpenWrt}"
17 distversion = "${3:-Development Snapshot}"
18
19 luciname = "$variant"
20 luciversion = "${5:-svn}"
21 EOF