Categories
computer

Keeping Multiple Development Machines Synchronized with Homeboy

Most of us developer types have at least two machines we use routinely, and managing that can be a chore. Specifically, I usually want to do the following every time I sit down at a machine to hack on something:

  • Keep config files like .bash_profile and .gitconfig  synchronized. (This requires scripting since Dropbox ignores hidden files.)
  • Patch all OS-level libraries using the native package management system on OSX, Ubuntu and CentOS.
  • Update my database daemons and other system services.
  • Upgrade development libraries.
  • Merge in ‘git pull origin master’ project source code for all my clones.

Doing all this every time I hop to a different machines was chore, so I wrote a few BASH scripts to help. More importantly, I recently packaged them into a public GitHub and released it! Homeboy is a set of small, plain BASH scripts. After following the simply installation instructions, you just run homeboy every morning:

$ homeboy

This will run the updates you specify, though I’ve only included the stuff I use regularly: namely brew (OSX), rvm (OSX and Linux), apt (Ubuntu), yum (Red Hat/CentOS) etc. I ask that you submit pull requests to add support for updating Perl, Python, MacPorts etc. The synchronization mechanism works by zipping the specified list of files into a .zip in a synchronized directory managed by Dropbox, SugarSync etc. “Pushing” your current set of files to Dropbox is done via:

$ homeboy-push

After pushing, the next time `homeboy’ is run on any configured machine, the .zip file will be unzipped into your home directory. It’s really not complicated, but saves time by having to make the same change a bunch of times across different machines and platforms, and having subtle differences.

When using the git options, homeboy assumes you have a single directory where all your clones are kept, such as ~/Developer/git. Every subdirectory that looks like a git clone will have ‘git pull origin master’ run inside it.

Pretty silly stuff, right? But hey, all I do is run `homeboy’ every morning I plan on doing development work on a machine, and sip on a cup coffee while everything is brought up to date. 🙂

Please help test and submit pull requests!

Categories
computer

LaTeX Broken On MacPort “texlive” Update

I spent about 4 hours today troubleshooting a stupid, stupid issue with the “texlive +full” package as provided by MacPorts, which is required to run certain GUI LaTeX editors such as TeXShop. Several days ago I ran an innocuous-looking…

preston$ sudo port sync
preston$ sudo port upgrade outdated

…and amongst many things that updated, texlive was one of them. Unfortunately, running tools such as the command-line “latex” command or GUIs such as TeXShop started giving me the following error:

This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010/MacPorts 2010_0)
restricted \write18 enabled.
—! /opt/local/var/db/texmf/web2c/pdftex/pdflatex.fmt doesn’t match pdftex.pool
(Fatal format file error; I’m stymied)

After much fruitless searching and hair pulling, I stumbled upon this ticket that notes the solution as:

preston$ sudo fmtutil-sys –all

After running this, LaTeX seems to work properly again. Sheesh.

(Note to product developers: I would personally pay at least $50 for a simple, clean, stand-alone OS X app that does LaTeX really well. TeXShop and TextMate both do a good job, but I’d really like a 5-star “just works” editor that doesn’t install a bunch of system-level stuff like MacTeX. Just sayin’. 🙂 )