tool to build SmartOS changelog

Ugly as sin, but it even works in a Mountain Gorilla checkout where origin is in the cache directory and don't have the other branches visible...
One last bit of style here, blocks should be written as followed:

if [[ test ]]; then
        <expr>
else
         <expr>
fi