github.com/keithballdotnet/deis@v1.0.1-0.20141111034523-a4511c46a6ce/builder/templates/check-repos (about) 1 #!/usr/bin/env bash 2 3 listcontains() { 4 for word in $1; do 5 [[ $word = $2 ]] && return 0 6 done 7 return 1 8 } 9 10 cd $(dirname $0) # absolute path 11 12 for repo in *.git; 13 do 14 reponame="${repo%.*}" 15 if ! listcontains "{{ range $services := .deis_services }}{{ Base $services.Key }} {{ end }}" "$reponame"; 16 then 17 rm -rf "$repo" 18 fi 19 done