diff options
author | dreieck | 2022-02-07 20:57:43 +0100 |
---|---|---|
committer | dreieck | 2022-02-07 20:57:43 +0100 |
commit | ffc4473b68e1e6b6f928ca42916215322e08d3a2 (patch) | |
tree | d1ce3ec589a7584f883f364f0f5ae83b9e65d8c7 | |
parent | d2c8aec81b6b3a9c60e7223b3111368f9a2fe30f (diff) | |
download | aur-ffc4473b68e1e6b6f928ca42916215322e08d3a2.tar.gz |
Updated `pkgver()`.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 16 |
2 files changed, 16 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = adhocspot-script-git pkgdesc = Bash script to easily configure your interface to share your internet connection and configure a DHCP and DNS and TFTP boot server to listen on it. IP, DHCP, DNS can be configured, and for WiFi interfaces also wireless mode and encryption. - pkgver = 20190514.3 - pkgrel = 2 + pkgver = 20190514.3+r3.20220207.d2c8aec + pkgrel = 1 epoch = 0 url = https://gitlab.com/dreieckli/adhocspot-script install = adhocspot-script.install @@ -14,7 +14,7 @@ pkgbase = adhocspot-script-git depends = net-tools depends = wireless_tools depends = wpa_supplicant - provides = adhocspot-script=20190514.3 + provides = adhocspot-script=20190514.3+r3.20220207.d2c8aec conflicts = adhocspot-script options = emptydirs source = adhocspot-script::git+https://gitlab.com/dreieckli/adhocspot-script.git @@ -3,8 +3,8 @@ _pkgname=adhocspot-script pkgname="${_pkgname}-git" epoch=0 -pkgver=20190514.3 -pkgrel=2 +pkgver=20190514.3+r3.20220207.d2c8aec +pkgrel=1 pkgdesc="Bash script to easily configure your interface to share your internet connection and configure a DHCP and DNS and TFTP boot server to listen on it. IP, DHCP, DNS can be configured, and for WiFi interfaces also wireless mode and encryption." url="https://gitlab.com/dreieckli/adhocspot-script" arch=('any') @@ -41,7 +41,17 @@ prepare() { } pkgver() { - "${srcdir}/${_pkgname}/adhocspot.sh" --version + _ver="$("${srcdir}/${_pkgname}/adhocspot.sh" --version)" + _rev="$(git rev-list --count HEAD)" + _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")" + _hash="$(git rev-parse --short HEAD)" + + if [ -z "${_ver}" ]; then + error "Version could not be determined." + return 1 + else + printf '%s' "${_ver}+r${_rev}.${_date}.${_hash}" + fi } package() { |