summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorthibsc2020-02-03 17:00:58 +0100
committerthibsc2020-02-03 17:00:58 +0100
commit6b7fa3688105eb9178f41384d3d87f9b315b3ef8 (patch)
tree6ac52d378de697abe25f804d4b89c903aa39ad3d
parent4b5086e23a49ab2af06bb0229cfb58003a6dbe43 (diff)
downloadaur-6b7fa3688105eb9178f41384d3d87f9b315b3ef8.tar.gz
Measure the execution time of a piped process feature
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD7
2 files changed, 7 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2f1713de6b7f..8e0d046d4932 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = stopwatchcpp
pkgdesc = A command line stopwatch
- pkgver = v1
+ pkgver = c7
pkgrel = 1
url = https://github.com/thibsc/stopwatch
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index e85552bfb232..a27e983b18da 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=stopwatchcpp
_gitname=stopwatch
_binaryname=sw
-pkgver=v1
+pkgver=c7
pkgrel=1
pkgdesc="A command line stopwatch"
arch=('any')
@@ -12,6 +12,11 @@ makedepends=('git')
source=("git+${url}.git")
sha256sums=('SKIP')
+pkgver() {
+ cd ${srcdir}/${_gitname}
+ printf "c%s" "$(git rev-list --count HEAD)"
+}
+
build() {
cd ${srcdir}/${_gitname}
make