You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
439 B
Bash

#!/bin/bash
## flacsplit
# Split a flac file associated with a given cue file into a subdirectory named split.
cue_file=$1
split_dir="$(dirname "$cue_file")/split"
# TODO: This will break if a filename has a " in it.
flac_file="$(cat "${cue_file}" | grep FILE | cut -d \" -f 2)"
mkdir -p "$split_dir"
shnsplit -f "$cue_file" -d "${split_dir}" -t %n-%t -o flac "${flac_file}"
echo 'Running cuetag.sh'
cuetag.sh "$cue_file" "$split_dir"/*