2022-10-30 14:33:51 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
# Description: check various bad patterns with grep
|
2022-11-20 15:36:28 +00:00
|
|
|
# https://postmarketos.org/pmb-ci
|
2022-10-30 14:33:51 +00:00
|
|
|
|
|
|
|
if [ "$(id -u)" = 0 ]; then
|
|
|
|
set -x
|
|
|
|
apk -q add grep
|
|
|
|
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Find CHANGEMEs in APKBUILDs
|
|
|
|
if grep -qr '(CHANGEME!)' *; then
|
|
|
|
echo "ERROR: Please replace '(CHANGEME!)' in the following files:"
|
|
|
|
grep --color=always -r '(CHANGEME!)' *
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-10-30 15:48:16 +00:00
|
|
|
|
|
|
|
# DTBs installed to /usr/share/db
|
|
|
|
# FIXME: doesn't pass currently, fix it and enable it afterwards
|
|
|
|
# if grep -r 'INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb'; then
|
|
|
|
# echo 'Please do not install dtbs to /usr/share/dtb!'
|
|
|
|
# echo 'Unless you have a good reason not to, please put them in /boot/dtbs'
|
|
|
|
# exit 1
|
|
|
|
# fi
|