theclapp

Search theclapp.blog-city.com

 

Editing locally, saving remotely: Lispworks editor backed by rsync

posted Sunday, 2-Dec-2007
I've written before about wanting to edit files locally but have changes propogated quickly to a remote server. A couple weeks back I put together a fairly general solution:
  • Mirror sub-trees "of interest" with a stand-alone script; run it every morning (or as often as seems appropriate)
  • Put a hook into Lispworks's "save file" code so that after you save, if the file comes from one of those "of interest" trees, use rsync to copy the changes remotely.
The mirror script is called update-mirrors (though for some reason Blog-City insists on removing dashes from the names of files I upload, so the URI is actually .../updatemirrors. :( ). The code to hook Lispworks's "save file" code is here (though again I call it "lw-rsync.lisp").

Hmm, I realize now that update-mirrors uses a small shell script ("drs") I wrote to make rsync look a little more like scp, provide a couple of default options, etc. So you can edit update-mirrors to call rsync directly (or email me and I will), or write your own "drs" script. (Given that my drs script is quite specific to my needs, and has the names of my employer and some servers in it, I'd just as soon not fiddle with it unless somebody actually wants it. It's fun shouting into the void and all, but unless somebody actually wants to use the fruits of my labor I see no reason to bother. :)

tags:          

links: digg this    del.icio.us    technorati    reddit