Skip to content

Instantly share code, notes, and snippets.

@goncha
Last active August 29, 2015 14:03
Show Gist options
  • Save goncha/d4bc9ebb4bbe386ee03d to your computer and use it in GitHub Desktop.
Save goncha/d4bc9ebb4bbe386ee03d to your computer and use it in GitHub Desktop.
Embed cuesheet in flac file
#!/bin/sh
FLAC="${1:-Disc.flac}"
CUE="${FLAC%%.flac}.cue"
if [ ! -r "$CUE" ]
then
echo "Cannot read '$CUE'"
exit 1
fi
# Remove all meta info of flac
metaflac --remove-all "${FLAC}"
# Import cue
metaflac \
"--set-tag-from-file=CUESHEET=${CUE}" \
"--import-cuesheet-from=${CUE}" \
"${FLAC}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment