use .SRCINFO
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nyyu 2021-05-19 13:17:53 +02:00
parent 3f2d19e47f
commit cb7bf38d4c

View file

@ -1,10 +1,11 @@
#!/bin/bash
build() {
name=$(grep '^pkgname=' PKGBUILD | cut -d'=' -f2)
ver=$(grep '^pkgver=' PKGBUILD | cut -d'=' -f2)
rel=$(grep '^pkgrel=' PKGBUILD | cut -d'=' -f2)
epoch=$(grep '^epoch=' PKGBUILD | cut -d'=' -f2)
makepkg --printsrcinfo > .SRCINFO
name=$(grep 'pkgname' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
rel=$(grep 'pkgrel' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
epoch=$(grep 'epoch' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
if [ -n "$epoch" ] ; then
epoch=$epoch:
fi