Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # store the current dir
  4. CUR_DIR=$(pwd)
  5.  
  6. # Let the person running the script know what's going on.
  7. echo -e "\n[Pulling in latest changes for all repositories...]"
  8.  
  9. # Find all git repositories and update it to the master latest revision
  10. for i in $(find ./* -maxdepth 1 -name ".git" | cut -c 3-); do
  11. echo "";
  12. echo -e "Pulling: $i \n";
  13.  
  14. # We have to go to the .git parent directory to call the pull command
  15. cd "$i";
  16. cd ..;
  17.  
  18. # finally pull
  19. git pull;
  20.  
  21. # lets get back to the CUR_DIR
  22. cd $CUR_DIR
  23. done
  24.  
  25. echo -e "\nComplete!\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement