blob: 3a31189dec6e2865b09b2234fbffea3eef13d6f4 [file] [log] [blame]
#!/bin/bash
#
REPOSITORIES_TXT="$1"; shift
name="$1"; shift
VAL=$( grep "^${name}:" "$REPOSITORIES_TXT" | cut -f2 -d" ")
if [ -z "$VAL" ]; then
echo No tag or branch specified for $name
exit
fi
git fetch
if [ -z "$(git tag -l $VAL)" ]; then
echo Updating branch $VAL
git checkout $VAL
git pull
else
echo Updating to tag $VAL
git checkout $VAL
fi