#!/bin/bash set -eu -o pipefail shopt -s failglob FAIL=0 GIT_TAG=$(git submodule status tor-browser-build | awk '{print $3}') GIT_URL=https://git.torproject.org/builders/tor-browser-build.git LATEST_TAG=$(git ls-remote --tags "${GIT_URL}" | grep 'tbb' | grep -v '\^{}' | awk '{print $2}' | awk -F"/" '{print $3}' | sort -V | tail --lines=1) if [ "${GIT_TAG}" != "(${LATEST_TAG})" ] then FAIL=1 echo "tor-browser-build: submodule uses ${GIT_TAG}, latest tag is ${LATEST_TAG}" fi if [ "${FAIL}" = 1 ] then exit 1 fi exit 0