summaryrefslogtreecommitdiffhomepage
path: root/build
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-01-17 16:35:02 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-01-17 16:35:02 +0000
commit89c8f98b12f28caf95989d99da6b6cb411f979c5 (patch)
treec438471ace8fbac62b400df7c585a21c6ba76cbc /build
parentf2148a5c65fa6c66d0d22fa43ec2f3e71aac9aa1 (diff)
build: add mkversion.sh helper script
contrib: (re-)generate version.lua at build time libs/core: use version.lua themes: adept header to version.lua, fix css for openwrt.org
Diffstat (limited to 'build')
-rwxr-xr-xbuild/mkversion.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/build/mkversion.sh b/build/mkversion.sh
new file mode 100755
index 000000000..2361e5f3b
--- /dev/null
+++ b/build/mkversion.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+local variant
+
+if [ "${4%%/*}" = "branches" ]; then
+ variant="LuCI ${4##*[-/]} Branch"
+elif [ "${4%%/*}" = "tags" ]; then
+ variant="LuCI ${4##*[-/]} Release"
+else
+ variant="LuCI Trunk"
+fi
+
+cat <<EOF > $1
+module "luci.version"
+
+distname = "${2:-OpenWrt}"
+distversion = "${3:-Development Snapshot}"
+
+luciname = "$variant"
+luciversion = "${5:-svn}"
+EOF