diff --git a/src/gen_image b/src/gen_image index 51ec553..02d8e8b 100644 --- a/src/gen_image +++ b/src/gen_image @@ -6,13 +6,14 @@ # gen_image - Generates image from list of lossless audio files # # USAGE -# gen_image [] [<...>] +# gen_image [] [<...>] # # DEPENDENCIES src/med_convert # # } gen_image() { + local TARGET_DIR="${1}"; shift local fileList=("${@}") if [[ ${#fileList[@]} -eq 1 ]]; then cat ${fileList[@]} > joined.flac @@ -24,7 +25,7 @@ gen_image() { echo ${fileList[@]} fileList=($(printf '%s\n' ${fileList[@]} | sed 's|flac|wav|')) echo ${fileList[@]} - shntool join -O always ${fileList[@]} -o flac + shntool join -O always ${fileList[@]} -d "${TARGET_DIR}" -o flac [[ $? -ne 0 ]] && return 1 return 2 fi