Allow "?=" for HOMEPAGE assignments in QA script

This commit is contained in:
Andreas Cord-Landwehr 2022-07-13 15:26:57 +02:00
parent 7ec04dfa5d
commit aebc193243

View file

@ -9,7 +9,7 @@ function validate_url()
local recipe=$1
local url=$2
local schema=`echo $url | cut -c 1-6`
local schema=$(echo $url | cut -c 1-6)
if [ $schema != "https:" ]; then
echo "Warning: $url in $recipe is not using SSL."
fi
@ -20,12 +20,12 @@ function validate_url()
fi
}
for r in `find -name *.inc -o -name *.bb`; do
if ! [ -z "`egrep '/usr|/etc' $r`" ]; then
for r in $(find -name *.inc -o -name *.bb); do
if ! [ -z "$(egrep '/usr|/etc' $r)" ]; then
echo "ERROR: $r uses hard-coded paths."
fi
url=`cat $r | grep HOMEPAGE | sed -e 's,HOMEPAGE\s*?=\s*\"\(.*\)\",\1,'`
url=$(cat $r | grep HOMEPAGE | sed -e 's,HOMEPAGE\s?\?=\s"\(.*\)",\1,')
if ! [ -z "$url" ]; then
validate_url "$r" "$url"
fi