Support per-sample Delta-E references via NAME > REF
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -128,13 +128,13 @@ wait_for_instrument() {
|
||||
scan_samples() {
|
||||
[[ -f "$SAMPLES_FILE" ]] || fail "$SAMPLES_FILE not found"
|
||||
|
||||
# Strip a leading "*" (the Delta-E reference marker) from displayed names.
|
||||
# Strip an optional " > REF" suffix from displayed names.
|
||||
# A while-read loop is used instead of mapfile for bash 3.2 (macOS) support.
|
||||
SAMPLES=()
|
||||
while IFS= read -r line; do
|
||||
SAMPLES+=("$line")
|
||||
done < <(grep -v '^#' "$SAMPLES_FILE" | grep -v '^[[:space:]]*$' \
|
||||
| sed -E 's/^[[:space:]]*\*[[:space:]]*//')
|
||||
| sed -E 's/[[:space:]]*>.*$//')
|
||||
local count="${#SAMPLES[@]}"
|
||||
[[ "$count" -gt 0 ]] || fail "No sample names found in $SAMPLES_FILE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user