Script to build main application