#!/bin/bash # SPDX-FileCopyrightText: 2021 Foundation Devices, Inc. # SPDX-License-Identifier: GPL-3.0-or-later RESULTS=$(find . -name '*.py' -exec grep -H fake_it[\ ]*=[\ ]*True {} +) LEN=`expr length "$RESULTS"` echo $RESULTS # echo $LEN if [[ $LEN -gt 0 ]]; then echo echo "======================================================" echo "ERROR: Never commit code with fake seeds or passwords!" echo "======================================================" exit 1 else exit 0 fi