I want to build a custom wordpress install script

Is there a way to build a custom wordpress install script ?

I would like to have some default plugins, templates, and content loaded up,and make it a install script.

Is there a way to do it ?