#!/bin/bash set -eu # Check whether any git repositories are defined. # Git repository definition contains `commit` and `remote` fields. if git grep -n "commit =\|remote =" -- '*.bzl'; then echo "Using git repositories is not allowed." echo "To ensure that all dependencies can be stored offline in distdir, only HTTP repositories are allowed." exit 1 fi # Check whether number of defined `url =` or `urls =` and `sha256 =` kwargs in # repository definitions is equal. urls_count=$(git grep -E "\