#!/usr/bin/env bash # A cut lane's build directory is a persistent build cache, not a finished # lane. The ledger otherwise adopts such a folder as # session_ends, deleting it between cuts. Claim it explicitly: the owner can # still drop it from Disk, but automatic lane cleanup never makes a cut cold. set -euo pipefail HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" . "$HERE/lib/owned-root.sh" . "$HERE/lib/cut-build.sh" cut_root="$(cut_build_root)" refuse_wide_root "the cut lanes' build directories" "$cut_root" mkdir -p "$cut_root" bash "$HERE/lane-claim.sh" "$cut_root" --kind scratch --rule owner_only --lane cut-build >/dev/null