CI: check for direct sourcing of deviceinfo (MR 4129)

See https://gitlab.com/postmarketOS/pmaports/-/issues/2086
This commit is contained in:
Newbyte 2023-05-29 14:59:50 +02:00
parent d7e56cc7c0
commit 96a21ace3f
No known key found for this signature in database
GPG key ID: 990600ED1DB95E02

View file

@ -38,3 +38,10 @@ if grep -qr '/usr/share/postmarketos-mkinitfs' -- *; then
grep --color=always -r '/usr/share/postmarketos-mkinitfs' -- *
exit 1
fi
# Direct sourcing of deviceinfo
if grep --exclude='source_deviceinfo' -qEr 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *; then
echo 'ERROR: Please source the source_deviceinfo script instead of sourcing deviceinfo directly!'
grep --color=always --exclude='rootfs-usr-share-misc-source_deviceinfo' -Er 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *
exit 1
fi