31.03.2013 16:09, Colin Guthrie kirjoitti: > Hi, > > Does anyone have a script that will bump the release of a given spec file? > > Obviously there are lots of different forms to set the release and I > guess the script has to back through the definition chain to find the > right place to "add one".
I use: perl -pi -e 's,((?:%define\s+rel(?:ease)?\b|Release:).*[\s\.])(\d+)(})?$,$1 . ($2+1) . $3,e' file.spec (with some boilerplate to check if it worked) Works on pretty much all cases except "%define foobarrel 1" style definitions. -- Anssi Hannula
