code: func scanScripts(name string) map[string]bool {
  	scriptsMap := make(map[string]bool)
  	items, err := ioutil.ReadDir(name)
  	if os.IsNotExist(err) {
  		glog.Warningf("Unable to access directory %q: %v", name, err)
  	}
  	if err != nil || len(items) == 0 {
  		return scriptsMap
  	}
  
  	assembleProvided := false
  	runProvided := false
  	saveArtifactsProvided := false
  	for _, f := range items {
  		glog.V(2).Infof("found override script file %s", f.Name())
  		if f.Name() == constants.Run {
  			runProvided = true
  			scriptsMap[constants.Run] = true
  		} else if f.Name() == constants.Assemble {
  			assembleProvided = true
  			scriptsMap[constants.Assemble] = true
  		} else if f.Name() == constants.SaveArtifacts {
  			saveArtifactsProvided = true
  			scriptsMap[constants.SaveArtifacts] = true
  		}
  		if runProvided && assembleProvided && saveArtifactsProvided {
  			break
  		}
  	}
  	return scriptsMap
  }
docs: // scanScripts returns a map of provided s2i scripts