3rdparty: Fix revision check

* Add a few nice to haves

Change-Id: I53e1fd7d067357af5ad625ebf86de3ee68903cbe
This commit is contained in:
Alexander von Gluck IV 2023-06-22 09:56:48 -05:00
parent 445d4fd926
commit a165c670fd

View File

@ -20,9 +20,9 @@ if [[ ! -d $REPOFILES ]]; then
fi fi
RESULT=0 RESULT=0
for f in $(find $REPOFILES -print); do for f in $(find $REPOFILES -maxdepth 1 -type f -print); do
ARCHITECTURE=$(cat $f | tr '\n' ' ' | awk '{ print $4 } ') ARCHITECTURE=$(cat $f | tr '\n' ' ' | awk '{ print $4 } ')
echo "================ Scanning $ARCHITECTURE" echo "================ Scanning $ARCHITECTURE / $f"
REPO_EXPECT=$(cat $f | grep -v "#" | grep '-' | grep 'bootstrap' | grep -v 'bootstrap_') REPO_EXPECT=$(cat $f | grep -v "#" | grep '-' | grep 'bootstrap' | grep -v 'bootstrap_')
for i in $REPO_EXPECT; do for i in $REPO_EXPECT; do
PACKAGE=$(echo $i | cut -d'-' -f1) PACKAGE=$(echo $i | cut -d'-' -f1)
@ -36,12 +36,13 @@ for f in $(find $REPOFILES -print); do
RESULT=1 RESULT=1
continue continue
fi fi
grep "REVISION=$REV" $RECIPE > /dev/null REV=$(echo $i | cut -d'-' -f3)
#echo $RECIPE grep "REVISION=\"$REV\"" $RECIPE > /dev/null
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo " $ARCHITECTURE $i... OK" echo " $ARCHITECTURE $i... OK"
else else
echo " $ARCHITECTURE $i... ERROR (Incorrect revision!)" FOUND_REV=$(grep "REVISION=" $RECIPE | cut -d'=' -f2)
echo " $ARCHITECTURE $i... ERROR (Incorrect revision! Found $FOUND_REV!)"
RESULT=1 RESULT=1
fi fi
#echo $i - $PACKAGE #echo $i - $PACKAGE