[gen_trackid] Relativized further by renaming GIT_DIR var to WRK_DIR
This commit is contained in:
parent
31c3b39b68
commit
8bcfa5fd2e
1 changed files with 4 additions and 4 deletions
|
@ -13,18 +13,18 @@
|
|||
# }
|
||||
|
||||
gen_trackid() {
|
||||
GIT_DIR="${1}"
|
||||
WRK_DIR="${1}"
|
||||
FLAC="${2}"
|
||||
CUE="${3}"
|
||||
|
||||
gen_tracks "${GIT_DIR}" "${FLAC}" "${CUE}" >/dev/null 2>&1
|
||||
gen_tracks "${WRK_DIR}" "${FLAC}" "${CUE}" >/dev/null 2>&1
|
||||
local TOTALTRACKS="$(grep -e "TRACK [0-9][0-9] AUDIO" "${CUE}" | wc -l)"
|
||||
|
||||
local COUNT=1
|
||||
while [[ ${COUNT} -le ${TOTALTRACKS} ]]; do
|
||||
local TRACKID="$(metaflac --list --block-number=0 $(printf "split-track%02d.flac" ${COUNT}) | awk 'BEGIN{FS=": "}{if($1==" MD5 signature") {print $2}}')"
|
||||
local TRACKID="$(metaflac --list --block-number=0 $(printf "${WRK_DIR}/split-track%02d.flac" ${COUNT}) | awk 'BEGIN{FS=": "}{if($1==" MD5 signature") {print $2}}')"
|
||||
printf "%s\t" ${TRACKID}
|
||||
rm $(printf "split-track%02d.flac" ${COUNT})
|
||||
rm $(printf "${WRK_DIR}/split-track%02d.flac" ${COUNT})
|
||||
local COUNT=$(( ${COUNT} + 1 ))
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue