code: func setup() string {
  	camliRootPath, err := osutil.GoPackagePath("perkeep.org")
  	if err != nil {
  		log.Fatal("Package perkeep.org not found in $GOPATH (or $GOPATH not defined).")
  	}
  	destDir = filepath.Join(camliRootPath, "vendor", "embed", "closure", "lib")
  	closureGitDir = filepath.Join(camliRootPath, "tmp", "closure-lib")
  	op := "update"
  	_, err = os.Stat(closureGitDir)
  	if err != nil {
  		if os.IsNotExist(err) {
  			err = os.MkdirAll(closureGitDir, 0755)
  			if err != nil {
  				log.Fatalf("Could not create %v: %v", closureGitDir, err)
  			}
  			op = "clone"
  		} else {
  			log.Fatalf("Could not stat %v: %v", closureGitDir, err)
  		}
  	}
  	dotGitPath := filepath.Join(closureGitDir, ".git")
  	_, err = os.Stat(dotGitPath)
  	if err != nil {
  		if os.IsNotExist(err) {
  			op = "clone"
  		} else {
  			log.Fatalf("Could not stat %v: %v", dotGitPath, err)
  		}
  	}
  	return op
  }
docs: // setup checks if the perkeep root can be found,
  // then sets up closureGitDir and destDir, and returns whether
  // we should clone or update in closureGitDir (depending on
  // if a .git dir was found).