2018-08-30 22:39:24 +00:00
|
|
|
#!/bin/sh -e
|
2020-01-06 01:46:56 +00:00
|
|
|
# Copyright 2020 Oliver Smith
|
2018-08-30 22:39:24 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
set -e
|
|
|
|
DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
|
|
cd "$DIR/.."
|
|
|
|
|
|
|
|
# Find CHANGEMEs in APKBUILDs
|
2019-09-13 23:43:05 +00:00
|
|
|
if grep -qr '(CHANGEME!)' *; then
|
2018-08-30 22:39:24 +00:00
|
|
|
echo "ERROR: Please replace '(CHANGEME!)' in the following files:"
|
2019-09-13 23:43:05 +00:00
|
|
|
grep --color=always -r '(CHANGEME!)' *
|
2018-08-30 22:39:24 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Shell: shellcheck
|
|
|
|
sh_files="
|
|
|
|
./main/postmarketos-base/firmwareload.sh
|
|
|
|
./main/postmarketos-mkinitfs/init.sh.in
|
|
|
|
./main/postmarketos-mkinitfs/init_functions.sh
|
2020-04-04 12:37:25 +00:00
|
|
|
./main/postmarketos-mkinitfs/mkinitfs.sh
|
2020-04-11 09:47:41 +00:00
|
|
|
./main/postmarketos-mkinitfs/mkinitfs_functions.sh
|
2020-04-04 12:18:13 +00:00
|
|
|
./main/postmarketos-mkinitfs/mkinitfs_test.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
./main/postmarketos-mkinitfs-hook-debug-shell/20-debug-shell.sh
|
|
|
|
./main/postmarketos-update-kernel/update-kernel.sh
|
|
|
|
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
2019-10-31 11:19:39 +00:00
|
|
|
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.sh')
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.pre-install')
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.post-install')
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.pre-upgrade')
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.post-upgrade')
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.pre-deinstall')
|
|
|
|
$(find . -path './main/postmarketos-ui-*/*.post-deinstall')
|
|
|
|
|
2018-08-30 22:39:24 +00:00
|
|
|
$(find . -name '*.trigger')
|
|
|
|
$(find . -path './main/devicepkg-dev/*.sh')
|
|
|
|
|
|
|
|
$(find . -path '.gitlab-ci/*.sh')
|
|
|
|
"
|
2019-10-31 11:19:39 +00:00
|
|
|
for file in $sh_files; do
|
2018-08-30 22:39:24 +00:00
|
|
|
echo "Test with shellcheck: $file"
|
|
|
|
cd "$DIR/../$(dirname "$file")"
|
|
|
|
shellcheck -e SC1008 -x "$(basename "$file")"
|
|
|
|
done
|