| Home Up |
Original: http://pld-linux.org/scripts.html Copy made: 25 Nov 2002 There are two very useful scripts in SPECS module. One is called builder, second is adapter.awk. Builder scriptbuilder can be used to:
Adapter is your friendadapter.awk is tool fixing common mistakes in spec files, and making them all look the same. There are some style guidelines in PLD concerning spec files. They are mostly formalized through few thousand examples in SPECS module and adapter.awk script. While this probably isn't very good way of formalization, this is how it works -- it is simply recommended to run specs through adapter.awk before doing commit. adapter.awk reads spec file passed as first argument or, if nothing is passed, standard input. Processed spec is dumped on standard output. For example, let's say you finally completed great foo.spec: [you@somewhere SPECS]$ ./adapter.awk foo.spec > foo.spec- [you@somewhere SPECS]$ diff -u foo.spec foo.spec- ... [you@somewhere SPECS]$ mv foo.spec- foo.spec [you@somewhere SPECS]$ cvs commit foo.spec You always should look at what adapter.awk broke^H^H^H^H^Hchanged. It is just a piece of awk and it is sometimes misled. Thats what's diff above is for. If you use vim to edit spec files you might find useful its diff mode, instead of using diff command. Simply instead of diff -u foo.spec foo.spec- run vim -d foo.spec foo.spec-. FIXME: There is probably something similar in operating system Emacs. Last updated: Mon, 25 Nov 2002 15:32:52 -0500 |