Sunday, October 22, 2006

Some Smalltalk

I have a small shell script that backs up my blog archives; it has a bunch of calls to wget for all the archive files since April '04, which is when I started blogging. Since I don't know shell scripting all that well, the script is not even intelligent enough to figure out the current month and use a for loop.

I decided to redo the script in VisualWorks. Problem was, I kept getting the exception related (I think) to Seaside that I mentioned earlier. I bravely stepped into the debugger, and I don't know what I did, but I now started getting another exception, something that seemed more fundamental; I wasn't even able to open the image successfully [*]. Back to a fresh base image (BTW, loading Seaside in this fresh image went through incredibly smoothly -- probably on account of all the downloads of the dependent packages the last time).

I managed to do nearly all the things I wanted to do, except for one thing: create a single tar.gz file that contains all the archive files. The GZipWriteStream class seems to create only single files. My not-so-elegant workaround is to feed all the archive files one after the other to the output .gz file's stream, in effect creating a single huge HTML file. Definitely not elegant.

[*] Coincidentally, Episode 6 of the Industry Misinterpretations podcast talks about image-based development and ways to recover from situations similar to mine.