From 96a21ace3fcc394cbc8e432f73d9267469b4bca9 Mon Sep 17 00:00:00 2001 From: Newbyte Date: Mon, 29 May 2023 14:59:50 +0200 Subject: [PATCH] CI: check for direct sourcing of deviceinfo (MR 4129) See https://gitlab.com/postmarketOS/pmaports/-/issues/2086 --- .ci/grep.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.ci/grep.sh b/.ci/grep.sh index 760d6f9cc..b21ffb9c5 100755 --- a/.ci/grep.sh +++ b/.ci/grep.sh @@ -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