diff --git a/build.sh b/build.sh index 365a166..dd676ad 100755 --- a/build.sh +++ b/build.sh @@ -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