0105a1d8ef
Refactor the install code to be generic, so we only need to add the new path in one place when adding a new file. Put the full path into the filename to make this possible. I've tried to mimic the final directory structure in the aport first (e.g. $pkgdir/sbin/swapfile -> main/postmarketos-base/sbin/swapfile), but that leads to conflicts as abuild only takes the filename for checksums (conflict with etc/conf.d/swapfile): https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10013 We don't really need checksum verification for the files shipped in the same directory (not downloaded), but nevertheless this is a bug. It leads to confusing behavior and might be fixed by letting abuild demand that there is only one source file with the same name, as I suggested in the issue linked above. So let's avoid this altogether with the flat file name.
47 lines
1.6 KiB
Bash
Executable file
47 lines
1.6 KiB
Bash
Executable file
#!/bin/sh -e
|
|
# Copyright 2020 Oliver Smith
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set -e
|
|
DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
cd "$DIR/.."
|
|
|
|
# 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
|
|
|
|
# Shell: shellcheck
|
|
sh_files="
|
|
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
|
|
./main/postmarketos-base/rootfs-usr-libexec-elogind-system-sleep-suspend-disable-conditions.hook
|
|
./main/postmarketos-mkinitfs/init.sh.in
|
|
./main/postmarketos-mkinitfs/init_functions.sh
|
|
./main/postmarketos-mkinitfs/mkinitfs.sh
|
|
./main/postmarketos-mkinitfs/mkinitfs_functions.sh
|
|
./main/postmarketos-mkinitfs/mkinitfs_test.sh
|
|
./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
|
|
|
|
$(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')
|
|
|
|
$(find . -name '*.trigger')
|
|
$(find . -path './main/devicepkg-dev/*.sh')
|
|
$(find . -path './main/postmarketos-mvcfg/*.sh')
|
|
|
|
$(find . -path '.gitlab-ci/*.sh')
|
|
"
|
|
for file in $sh_files; do
|
|
echo "Test with shellcheck: $file"
|
|
cd "$DIR/../$(dirname "$file")"
|
|
shellcheck -e SC1008 -x "$(basename "$file")"
|
|
done
|