summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgen-package17
1 files changed, 16 insertions, 1 deletions
diff --git a/gen-package b/gen-package
index f786ca3..dcb2c0b 100755
--- a/gen-package
+++ b/gen-package
@@ -2,8 +2,23 @@
set -e
+git_version()
+{
+ local date rev
+
+ date=`git log --date=iso|sed --silent \
+ 's/^Date:\s*\([0-9]*\)-\([0-9]*\)-\([0-9]*\) [0-9]*.*/\1\2\3/p'|sort|
+ tail -1`
+
+ rev=`git log --date=iso|sed --silent \
+ 's/^Date:\s*\([0-9]*\)-\([0-9]*\)-\([0-9]*\) [0-9]*.*/\1\2\3/p'|
+ grep $date|wc -l`
+
+ printf "%s" $date-$rev
+}
+
CONTROL='Package: go-webbrowser-launcher
-Version: 20140601-1
+Version: '`git_version`'
Maintainer: cos <cos>
Description: Wrapper script to conveniently(sic?) launch web browsers.
Section: base