denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)
Denise ([staff profile] denise) wrote in [site community profile] dw_dev_training2011-08-20 10:49 pm

Useful scripts

(Can you tell I've been coding lately? Like the last four posts here have been from me ...)

I was talking with [personal profile] rb this evening about useful scripts I have put together for my dreamhack -- some of which I came up with myself, and some of which I stole from other people, such as [staff profile] mark -- and figured it would be a good idea to post them and ask everybody else to post their own useful scripts!

(If you want to install these to your own 'hack, put them in ~/bin and then chmod +x filename to make them executable.)



1. sl -- syncs the live code (in ~/dw) to the code in cvs (~/dw/cvs/dw-{non}free)




2. sc -- syncs the code in cvs (~/dw/cvs/dw-{non}free) to the code in live (~/dw), and cleans up any .orig or .rej files lying around from previous reversions or failed patch attempts. (Might produce a "rm: missing arguments" if there are none of those files.)



3. tidy -- cleans up any .orig or .rej files lying around. Will produce a "rm: missing argument" if there are none of these files.



4. dbu -- runs the database update commands. does NOT pull most recent code first -- use this when you've made styles changes or made changes to the db schema in order to see your changes reflected on the live site.



5. bap: for Bounce APache. stops and starts apache (need to do this if you've changed any .pm files in order for your changes to be reflected on your 'hack -- if you're making changes and they aren't being reflected in the browser when you reload the page, and you're positive you're working in live and not in cvs, bounce the apache.) I totally stole the name from [staff profile] mark.



6. upgrade: does all the steps necessary to upgrade your 'hack to the most recent code. (don't run this if you have any changes in either your live or cvs directory -- it will error. pop your patches off the stack, or revert everything, and then run the upgrade commands.)



So, what other useful scripts do you have?