Split2flac is incompatible with the dash (a POSIX compliant /bin/sh implementation) due to the use of the "&>" output redirection operator in conjunction with the "which" commands. In order to fix this, the "&>" operator has been replaced by ">", and (in order to avoid the outputs to stderr) "which" has been replaced by "command -v".
Unified · Split
| @@ -224,11 +224,11 @@ if [ ${SAVE} -eq 1 ]; then · 223 unmodified lines | ||
| 224 | 224 | fi |
| 225 | 225 | |
| 226 | 226 | # use flake if possible |
| 227 | −which flake &>/dev/null && FLAC_ENCODER="flake" || FLAC_ENCODER="flac" | |
| 227 | +command -v flake >/dev/null && FLAC_ENCODER="flake" || FLAC_ENCODER="flac" | |
| 228 | 228 | |
| 229 | 229 | METAFLAC="metaflac --no-utf8-convert" |
| 230 | 230 | VORBISCOMMENT="vorbiscomment -R -a" |
| 231 | −which mid3v2 &>/dev/null && ID3TAG="mid3v2" || ID3TAG="id3tag -2" | |
| 231 | +command -v mid3v2 >/dev/null && ID3TAG="mid3v2" || ID3TAG="id3tag -2" | |
| 232 | 232 | MP4TAGS="mp4tags" |
| 233 | 233 | GETTAG="cueprint -n 1 -t" |
| 234 | 234 | VALIDATE="sed s/[^][[:space:][:alnum:]&_#,.'\"\(\)!-]//g" |