Guest User

Untitled

a guest
Jun 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. BASEPATH=/etc/ansible
  4.  
  5. chkGitStatus () {
  6. local gitrepo=$1
  7. echo REPO: "$(dirname "${gitrepo}")"
  8. pushd "$(dirname "${gitrepo}")" > /dev/null
  9. git status --short
  10. echo -e "\n"
  11. popd > /dev/null
  12. }
  13. export -f chkGitStatus
  14.  
  15. echo -e "\n"
  16. find ${BASEPATH} -type d -name .git -exec bash -c 'chkGitStatus "$0"' {} \;
Add Comment
Please, Sign In to add comment