Skip to content

Instantly share code, notes, and snippets.

@dbolser
Created March 10, 2014 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbolser/9464909 to your computer and use it in GitHub Desktop.
Save dbolser/9464909 to your computer and use it in GitHub Desktop.
for module in \
ensembl \
ensembl-compara \
ensembl-funcgen \
ensembl-rest \
ensembl-tools \
ensembl-variation
do
if [ ! -d "$module" ]; then
echo "Checking out $module ($branch)"
git clone -b $branch https://github.com/Ensembl/${module} || {
echo "Could not check out $module ($branch)" 1>&2
exit 2
}
else
echo "Already got $module"
echo "Attempting to fetch, switch branch ($branch) and merge..."
cd $module
git fetch $remote
git checkout $branch || {
echo "Could not check out $module ($branch)" 1>&2
break
exit 2
}
git merge $remote || {
echo "Could not merge $module ($branch)" 1>&2
break
exit 2
}
git status
cd ../
fi
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment