»1. cvsreport.pl: Adding & Overlaying

In $LJHOME/bin there's a tool named cvsreport.pl which manages (among other things) merging together the general files and your site-local files into the live area under $LJHOME.

The command you'll need most of the time is:

$ cvsreport.pl -c -s

-c is short for --cvsonly (only copies from the cvs directory back to the live area, not vice-versa) and -s is short for --sync (which means actually do the copying, don't just print out what it would've done, which is the default without -s).

So, say you want to override the provided htdocs/index.bml file. Create the htdocs under $LJHOME/cvs/local and put a index.bml file in it, then run cvsreport.pl -c -s and you're set.

More commonly, you'll be adding new files, rather than replacing provided ones. In general, you should never really need to replace files, since you should already be able to change all the text, images, and layout of any given page. Replacing a file would mean duplicating functionality, and that's bad.

One popular strategy with the general code libraries is to look for a similarly named file with -local in it and load that also. That way you inherit all the functionality that's provided, and change only what you want. When general changes, you don't have to update right away... you can change things later if you want, or keep the newly added stuff as it was given to you.