Establish MOUSE ports collection

This commit is contained in:
Michal S.
2026-07-30 21:57:33 +01:00
commit 6dfbfa1938
5 changed files with 69 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
found=0
for directory in "$root"/ports/*; do
[ -d "$directory" ] || continue
[ "${directory##*/}" != README.md ] || continue
found=1
name=${directory##*/}
case "$name" in
""|[!a-z]*|*[!a-z0-9-]*)
printf '%s\n' "invalid port directory name: $name" >&2
exit 1
;;
esac
[ -f "$directory/port.conf" ] || {
printf '%s\n' "missing recipe: ports/$name/port.conf" >&2
exit 1
}
[ -x "$directory/build.sh" ] || {
printf '%s\n' "missing executable build script: ports/$name/build.sh" >&2
exit 1
}
sh -n "$directory/build.sh"
done
if [ "$found" -eq 0 ]; then
printf '%s\n' "ports collection is empty"
else
printf '%s\n' "ports layout check passed"
fi