for PRODUCT in ${AAA} ${BBB} ${CCC}; do
for GITBRANCH in ${AAA_BRANCH} ${BBB_BRANCH} ${CCC_BRANCH}; do
cd ${PRODUCT}
git checkout ${GITBRANCH}
done;
done
My nested for loop in bash (above) does:
cdunder AAA repo and check out AAA_BRANCHcdunder AAA repo and check out BBB_BRANCHcdunder AAA repo and check out CCC_BRANCHcdunder BBB repo and check out AAA_BRANCHcdunder BBB repo and check out BBB_BRANCHcdunder BBB repo and check out CCC_BRANCHcdunder CCC repo and check out AAA_BRANCHcdunder CCC repo and check out BBB_BRANCHcdunder CCC repo and check out CCC_BRANCH
I want my loop to:
cdunder AAA repo and check out AAA_BRANCHcdunder BBB repo and check out BBB_BRANCHcdunder CCC repo and check out CCC_BRANCH
How can I accomplish this? Thx