Files
scoutfs-notify/apply.sh
T
William Gill 50b9e27f75 Initial scoutfs-notify patch series for v1.29
Two-patch series that layers an observer-only file-access
notification stream onto scoutfs.  See README.md for the design
summary and rebase workflow.

Base: scoutfs v1.29
2026-04-22 10:21:21 -05:00

27 lines
690 B
Bash

#!/usr/bin/env bash
#
# Apply the scoutfs-notify patch series to a scoutfs working tree.
#
# Usage: apply.sh /path/to/scoutfs
#
set -euo pipefail
HERE=$(cd "$(dirname "$0")" && pwd)
TREE="${1:?usage: $0 /path/to/scoutfs}"
if [ ! -d "$TREE/.git" ]; then
echo "error: $TREE is not a git working tree" >&2
echo "hint: use 'patch -p1' directly for tarball trees (see README)" >&2
exit 2
fi
BASE="$(head -n1 "$HERE/base.txt" | awk '{print $1}')"
if [ -n "$BASE" ]; then
if ! git -C "$TREE" rev-parse --verify "$BASE" >/dev/null 2>&1; then
echo "warning: base '$BASE' not found in target tree" >&2
fi
fi
cd "$TREE"
git am --3way --keep-cr "$HERE"/patches/*.patch