From 384cad646c9d72f5b1085ac6182f1bcab3b478af Mon Sep 17 00:00:00 2001 From: ayakael Date: Sun, 22 Jul 2018 20:16:28 -0800 Subject: [PATCH] [cmd_import_images] Now sends output of import_src and import_images to STDERR --- src/cmd_import_images | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd_import_images b/src/cmd_import_images index c2af9f5..69e1976 100644 --- a/src/cmd_import_images +++ b/src/cmd_import_images @@ -16,6 +16,7 @@ cmd_import_images() { local GIT_DIR="${1}" local SOURCE="${2}"; shift 2 local dirList=("${@}") + for dir in ${dirList[@]}; do folderList=($(find "${dir}" -name '*.cue' -printf '%h\n' | awk '!seen[$0]++')) @@ -43,8 +44,7 @@ cmd_import_images() { (jpg) local COVER="${fileList}" ;; esac done - import_images "${GIT_DIR}" "${SOURCE}" "${IMG}" "${CUE}" $([[ -n "${ACCURIP}" ]] && echo "-a") "${ACCURIP}" $([[ -n "${LOG}" ]] && echo "-l") "${LOG}" $([[ -n "${COVER}" ]] && echo "-c") "${COVER}" - echo + import_images "${GIT_DIR}" "${SOURCE}" "${IMG}" "${CUE}" $([[ -n "${ACCURIP}" ]] && echo "-a") "${ACCURIP}" $([[ -n "${LOG}" ]] && echo "-l") "${LOG}" $([[ -n "${COVER}" ]] && echo "-c") "${COVER}" >${STDERR} 2>&1 local EXIT=$? [[ ${EXIT} -eq 0 ]] && _msg OK || _msg WARN "Import_images exited with code ${EXIT}" done @@ -54,7 +54,7 @@ cmd_import_images() { local importList=($(find ${GIT_DIR}/.import/${SOURCE}/ -mindepth 1 -maxdepth 1 -type d -printf '%p\t')) for import in ${importList[@]}; do _msg EXEC "Importing ${import}" - import_src "${GIT_DIR}" "${import}" + import_src "${GIT_DIR}" "${import}" >${STDERR} 2>&1 local EXIT=$? [[ ${EXIT} -eq 0 ]] && _msg OK || _msg WARN "import_src exited with code ${EXIT}" done