Generalized the thumb building script a bit.