#!/bin/sh set -eu root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) [ -f "$root/ports/Mk/mouse.port.mk" ] [ -x "$root/ports/Mk/Scripts/check-plist.sh" ] [ -x "$root/ports/Mk/Scripts/checksum.sh" ] [ -x "$root/ports/Mk/Scripts/checksum-cargo.sh" ] [ -x "$root/ports/Mk/Scripts/fetch.sh" ] [ -x "$root/ports/Mk/Scripts/fetch-cargo.sh" ] [ -x "$root/ports/Mk/Scripts/install-depends.sh" ] [ -x "$root/ports/Mk/Scripts/package.sh" ] [ -x "$root/ports/Mk/Scripts/vendor-cargo.sh" ] if grep -REn '(^|[[:space:]])make[[:space:]]+-C' "$root/ports/Mk"; then printf '%s\n' "ports infrastructure must recurse with bmake" >&2 exit 1 fi grep -Fq 'BMAKE?=' "$root/ports/Mk/mouse.port.mk" grep -Fq '"$bmake" -C "$portsdir/$origin" install' \ "$root/ports/Mk/Scripts/install-depends.sh" find "$root/ports" -mindepth 2 -maxdepth 2 -type d \ ! -path "$root/ports/Mk/*" -print | while IFS= read -r port; do for file in Makefile distinfo pkg-plist; do [ -f "$port/$file" ] || { printf '%s\n' "missing $file: $port" >&2 exit 1 } done done printf '%s\n' "ports layout checks passed"