I've done a few bash scripts myself, and I'm not even sure if bash would be the best way to do this, but here goes anyways.
I constantly build rpms for Mandriva and always have to edit the spec files before building them with certain criteria. I was wondering if someone has or can do a bash script to accomplish something.
I'm wanting to add 2 lines to a spec file under the %changelog section of the file now. The two lines I need/want have to be exactly as I have them below, followed by a blank line and the two lines have to start on the first line after the %changelog line in the spec file
* Thu Aug 25 2005 Cliff Wade <email@example.com>
- Built for the SoS Rpm Repository located at: http://seerofsouls.com
They have to be exactly like that, with the * and the - in the beginning as shown above. The day, month date and year need to be the current day, month, date, and year that the script is run and the lines added to the spec file.
When you rebuild anywhere from 10 to 80 .src.rpms per day, it gets a little old typing that once, then copy/pasting it to each and every spec file. I'd like to be able to run something like ./changelog.sh *.spec and it add that line to every spec file in the directory, keeping the name of the spec file in tact as well.
If any further info is needed, please let me know here and I will gladly provide it ASAP.
Thanks in advance!
The box said: Requires Windows 98 or better, So I installed Linux!
Registered Linux User #362532
IRC server: irc.freenode.net in #LFD