This is what I do, too. Most of mine is portable, but I have a block in bashrc that branches on uname.