Add register option to build egg script