'Build templates.'

def Build(self):

    self.SetupVars()
    self.Clean()
    if args.cloud_storage_sdist_bucket:
        (core_sdist, client_sdist) = self.CopySdistsFromCloudStorage()
    else:
        if (not os.path.exists(args.grr_src)):
            self.GitCheckoutGRR()
        core_sdist = self.MakeCoreSdist()
        client_sdist = self.MakeClientSdist()
    self.InstallGRR(core_sdist)
    self.InstallGRR(client_sdist)
    self.BuildTemplates()
    if args.test_repack_install:
        self._RepackTemplates()
        self._InstallInstallers()
    if args.cloud_storage_output_bucket:
        self.CopyResultsToCloudStorage()
