On 6 February 2011 00:58, Ray Rashif <schiv@archlinux.org> wrote:
On 5 February 2011 21:23, Bernardo Barros <bernardobarros2@gmail.com> wrote:
Hey all,
How to have access and change PKGBUILD variables? Is there command-line tools for this kind of job, so one could easily check, for example, the version number, change it and update the checksum?
There is no such prepackaged tool, because we assume these are trivial tasks which I'm sure you can chalk up yourself, for eg.:
#!/bin/bash find /var/abs -name $1 -exec grep ^pkgver=[a-zA-Z0-9].* {}/PKGBUILD \; | sed 's/pkgver=//'
To check.
find /var/abs -name $1 -exec sed 's/^pkgver=.*/pkgver=3.4/' -i {}/PKGBUILD \;
To change.
Of course, you have to do some copying from /var/abs and not just edit directly like that.