Is there a way to scale the object, but not the texture?

I have a wall object, with a brick texture. In order to make the wall larger, I scale it along a particular axis, but this stretches the brick texture, and then I have to go into the UV editor to re-scale the texture coordinates.

Is there any way to make this automatic, so that I don’t have to do it manually (or write a plug-in … assuming someone didn’t write one already)?