Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. branch=master
  2.  
  3. projects='Middleware Commons BreedingManager DatasetImporter Fieldbook GermplasmStudyBrowser Workbench WebService WorkbenchLauncher Migrator3to4 BMSAPI DBScripts AcceptanceTests GDMS Documentation BMSConfig'
  4.  
  5. for proj in $projects
  6. do
  7. cd $proj
  8.  
  9. echo -e '\n\x1B[1;31m=====' $proj '=====\x1B[0m'
  10.  
  11. current_branch=`/usr/bin/git rev-parse --abbrev-ref HEAD`
  12. echo 'Current branch is: ' $current_branch
  13.  
  14. echo 'Switching ' $proj ' to branch: ' $branch
  15. git checkout $branch
  16. git pull
  17.  
  18. if [ $branch != $current_branch ]
  19. then
  20. echo 'Switching ' $proj ' back to previous working branch: ' $current_branch
  21. git checkout $current_branch
  22. fi
  23.  
  24. cd ..
  25. done
  26. echo 'Done!!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement