#!/bin/sh
# Copy the benchmark subset (the album directories listed in a file, one path per line relative to
# the collection root) to local disk. The list is not committed: it names a private collection. Selection: directories holding flac / mp3 / m4a files, ordered by
# md5(path), skipping directories over a size cap (flac 300 MB, mp3 90 MB), first 70 flac + 300 mp3 + all
# m4a (2), plus the two directories holding the long FLACs.
set -eu
SRC=${1:?usage: build_subset.sh COLLECTION_ROOT DEST LIST}
DST=${2:?usage: build_subset.sh COLLECTION_ROOT DEST LIST}
LIST=${3:?usage: build_subset.sh COLLECTION_ROOT DEST LIST}
mkdir -p "$DST"
cd "$SRC"
rsync -rt --files-from="$LIST" --no-implied-dirs . "$DST"/
