#!/bin/bash # include some common stuff, like check_workspace, etc.. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source ${SCRIPT_DIR}/platforms-common.sh tag=$1 remote=working check_workspace # list of dirs I want to tag dirs=( build-scripts model-scripts ramdisk recovery u-boot tools/uefi-tools vexpress-firmware /linaro/g.l.o/landing-teams/working/arm/manifest.git ) for ((i=0;i<${#dirs[@]};++i)); do echo dir: ${dirs[i]} pushd ${dirs[i]} > /dev/null git rem | grep $remote > /dev/null ret=$? if [ "$ret" != "0" ] then echo ${dirs[i]} does not have a remote called $remote exit fi # Now do the tagging git tag -l $tag count=`git tag -l $tag | wc -l` if [ "$count" == "0" ] then echo "good, the tag doesn't exist" tmptag=$tag # handle special cases where the tag is augmented somehow case "${dirs[i]}" in "recovery" ) tmptag=`echo $tmptag | sed s#armlt#armlt-juno#` ;; "vexpress-firmware" ) tmptag=`echo $tmptag | sed s#armlt#armlt-vexpress#` ;; esac echo This is the tag: $tmptag git tag $tmptag git push $remote $tmptag else echo "drat, the tag already exists in ${dirs[i]}" fi # done popd > /dev/null done