:-(

Please note that all blog posts before 8 April 2007 were automatically imported from LiveJournal.  To see the comments and any LiveJournal-specific extras such as polls and user icons, please find the source posting at http://brianenigma.livejournal.com/2006/07/

Some difference in the way Linux's Bash and OS X's Bash handle variables just caused me to nuke my laptop.

#!/bin/sh
PREFIX=/usr/local
FOLDER=powerpc-linux411
....
build_toolchain()
{
rm -rf ${PREFIX}/${FOLDER}
mkdir -p ${PREFIX}/${FOLDER}
cd ${PREFIX}/${FOLDER}
...
}
...

Yep, it effectively ran “rm -rf /” (just like my license plate) sudo'ed as root. I know that it got far enough that GUI apps wouldn't launch. I know it got far enough that the init process doesn't exist, so I can't boot. I don't know if it got to my home directory or local CVS repository. My last backup was about two weeks ago and since then, I have done all sorts of big things like: print ads for Kim's business, the 2.0 launch of the Perplex City Card Catalog, photos of the Highland Games and the PDX Pillow Fight.

Fuck.

I'll be able to recreate everything (either manually or by grabbing deployed files), but it'll be a pretty big pain in the ass and will involve watching lots of percentage bars. I will have to do everything tonight, as I'm camping this weekend and would really rather not have this hanging over my head at that time. Time to start looking at more robust backup solutions.

Posted in: Code

Leave a Reply

Your email address will not be published. Required fields are marked *