Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- branch=master
- projects='Middleware Commons BreedingManager DatasetImporter Fieldbook GermplasmStudyBrowser Workbench WebService WorkbenchLauncher Migrator3to4 BMSAPI DBScripts AcceptanceTests GDMS Documentation BMSConfig'
- for proj in $projects
- do
- cd $proj
- echo -e '\n\x1B[1;31m=====' $proj '=====\x1B[0m'
- current_branch=`/usr/bin/git rev-parse --abbrev-ref HEAD`
- echo 'Current branch is: ' $current_branch
- echo 'Switching ' $proj ' to branch: ' $branch
- git checkout $branch
- git pull
- if [ $branch != $current_branch ]
- then
- echo 'Switching ' $proj ' back to previous working branch: ' $current_branch
- git checkout $current_branch
- fi
- cd ..
- done
- echo 'Done!!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement