Update: I found split2flac,which does all this automatically.
From aidanjm’s stuff :
Lossless audio files can be split by cue file using “shnsplit” (part of the “shntool” package). You will also need the “cuebreakpoints” tool (part of the “cuetools” package) and “cuetag” to transfer the tags.