I have a PKGBUILD file (for AUR) which I am maintaining. It has a value 'pkgrel' which I increment by 1 (manually), before building the package each time.
To summarize, if I want to build the package the sixth time, I'll manually set the value as
pkgrel=6
There are other processes for which I have written a bash script. I am stuck here. Please guide me on how to increment that value of pkgrel via any sed/awk expression. I want it that way so that say, I build the package the 7th time, the SED/AWK expression should set the value to 7
pkgrel=7
before I run the makepkg command in my script.
I am not restricting answers to sed/awk, if any other method works, please do guide me. The only condition is it should be bash.