Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Update a bunch of git repos on command
  4. #
  5.  
  6. set -e
  7.  
  8. # get a list of non-hidden directories
  9. shopt -u dotglob
  10.  
  11. # iterate through list
  12. for d in */; do
  13. echo "========================"
  14. echo " ${d%/}"
  15. echo "========================"
  16. cd ${d%/}
  17. if [[ -d ".git" ]]; then
  18. git pull
  19. fi
  20. cd ..
  21. echo ""
  22. echo ""
  23. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement