#!/bin/bash # # This script downloads the base CRAM repositories from their # respective GitHub URLs and checks out the version tag given as # parameter. # # Should any questions arise, don't hesitate to drop a mail to # Jan Winkler . # # Example usage: $ ./cram_tag_co.sh v0.1 # Will check out the version 'v0.1' of all mentioned CRAM # components. # # Script version as of March 15th, 2013. # TAG_NAME=$1 COMPONENTS=(cram_core cram_highlevel cram_gazebo cram_physics cram_pr2) echo "Checking out tagged version '${TAG_NAME}'." for item in ${COMPONENTS[*]} do if [ ! -e ./${item} ] ; then git clone https://github.com/cram-code/${item}.git ${item} fi cd ${item} git checkout ${TAG_NAME} cd .. done