rs-system

It took me about 5 minutes to write a little “rs-mgr” script, having already came up with an interesting solution for a routine problem.

I think I’ll start checking stuff into a little git repo, for safe keeping. Basically it is a simple system built around rsync and ssh, designed to meet *my* needs for getting work done.

At first, I experimented to find the desired rsync setup, then I wrote scripts to do the job; rsync has a batch mode of sorts, but not one I’m prepared to go to bed with. The first incarnation of the system, relied upon the rs-push and rs-pull scripts. Which respectively drive `rsync home remote` and `rsync remote home` operations with the desired tweaks.

They are simple and easy to adjust, but only know how to do exactly ONE thing well: rsync my home directory in a given direction.

Since there are some kinds of file that do little good if shared between different OSes, like object files. I wrote a central file (rs-exclude) to use for weeding out unwanted files from the transfer. That was a quick adjustment to rs-push and rs-pull. Currently my rs-exclude file causes rsync to ignore any GCC or MSVC object files, as well as useless Intellisense databases.

The remaining problem of course, is how to get my machine to automagically do the right thing. I would rahter like it to do the magic at login and logout time, but how to do it? Simple: write another program. The new “rs-mgr” leverages its companions to solve the pushmi-pullyu problem. By invoking rs-mgr, I can make sure the most up to date version is used rather then having to decide which, by way of doing a manual rs-push or rs-pull command.

I’ve taken a few moments to setup a git repo and adjust things for more portability, namely the defaults are no longer hard coded. Going to setup a level 0 dump of the good mirror, then configure my laptop with the updated versions, and set it up to run rs-mgr at the start and close of my X Windows session.

I am just hopelessly geeky…. ain’t I?