diff options
| author | Paul Buetow <paul@buetow.org> | 2026-07-10 15:29:29 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-07-10 15:29:29 +0300 |
| commit | 817c9e38c38152ddbd87cf381c1502ba5b504aa7 (patch) | |
| tree | 6d725b48306f4d305afc810b71c06e0f30a1b757 /packages/scripts/pkg-dtail-freebsd.sh | |
| parent | 2f5b1fa3df0b49c5453aee19520e9a090794d044 (diff) | |
packages: fail fast on empty DTail version (review follow-up)
- Makefile: new check-dtail-version target guards dtail-openbsd,
dtail-freebsd, and the build-VM stamp recipe — a wrong DTAIL_SRC now
aborts with a clear error before any VM start, /tmp cleanup, or
remote work runs with an empty version in the file names (dtail-netbsd
already had an equivalent inline guard)
- Makefile: dtail-openbsd pre-cleans its stale staging tgz like the
netbsd target, so a failed run can never silently upload an old
package
- pkg-dtail-openbsd.sh / pkg-dtail-freebsd.sh: reject a missing version
argument like pkg-dtail-netbsd.sh (would otherwise build dtail-.tgz)
Verified: make -n renders the guard first for both targets;
make dtail-{openbsd,freebsd} DTAIL_SRC=/nonexistent fails fast with the
version error before any rm/remote step. Guards only change failure
paths — no package rebuild needed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/scripts/pkg-dtail-freebsd.sh')
| -rw-r--r-- | packages/scripts/pkg-dtail-freebsd.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/scripts/pkg-dtail-freebsd.sh b/packages/scripts/pkg-dtail-freebsd.sh index 1d42aaf..b17c3b6 100644 --- a/packages/scripts/pkg-dtail-freebsd.sh +++ b/packages/scripts/pkg-dtail-freebsd.sh @@ -9,6 +9,10 @@ set -e VERSION="$1" +if [ -z "$VERSION" ]; then + echo "Error: version argument missing (would build dtail-.tgz)" >&2 + exit 1 +fi PV_DEST="$2" NAME="dtail" COMMENT="Distributed log tail and grep tool" |
