2018-08-30 22:39:24 +00:00
|
|
|
#!/bin/sh -e
|
2021-01-07 23:16:08 +00:00
|
|
|
# Copyright 2021 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="
|
2021-05-24 05:26:28 +00:00
|
|
|
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
|
2022-01-22 18:15:25 +00:00
|
|
|
./main/osk-sdl/unlock.sh
|
2020-11-10 11:38:43 +00:00
|
|
|
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
|
2021-10-09 23:00:41 +00:00
|
|
|
./main/postmarketos-installkernel/installkernel-pmos
|
2021-08-17 07:03:01 +00:00
|
|
|
./main/postmarketos-mkinitfs/init.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
./main/postmarketos-mkinitfs/init_functions.sh
|
|
|
|
./main/postmarketos-mkinitfs-hook-debug-shell/20-debug-shell.sh
|
2021-06-04 15:57:45 +00:00
|
|
|
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
|
2018-08-30 22:39:24 +00:00
|
|
|
./main/postmarketos-update-kernel/update-kernel.sh
|
2021-05-24 05:26:28 +00:00
|
|
|
./main/swclock-offset/swclock-offset-boot.sh
|
|
|
|
./main/swclock-offset/swclock-offset-shutdown.sh
|
2021-07-04 19:59:15 +00:00
|
|
|
./main/ttyescape/*.post-install
|
2022-01-22 18:14:26 +00:00
|
|
|
./main/unl0kr/unlock.sh
|
2021-08-04 11:05:49 +00:00
|
|
|
./main/msm-firmware-loader/*.sh
|
|
|
|
./main/msm-firmware-loader/*.post-install
|
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')
|
2020-11-12 09:08:56 +00:00
|
|
|
$(find . -path './main/postmarketos-mvcfg/*.sh')
|
2018-08-30 22:39:24 +00:00
|
|
|
|
2021-09-13 16:15:23 +00:00
|
|
|
$(find . -path '.ci/*.sh')
|
2018-08-30 22:39:24 +00:00
|
|
|
"
|
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
|