indexers: fix bug when creating directory for log

This commit is contained in:
DavHau 2022-10-07 18:57:05 +02:00
parent 9ea5cc8647
commit b3102cb87e

View File

@ -25,9 +25,10 @@
translate $jobJson $targetDir &> $TMPDIR/log \
|| (
echo "Failed to translate $1"
mkdir -p ./translation-errors
jobId=$(jq '.id' -c -r <(echo "$jobJson"))
cp $TMPDIR/log ./translation-errors/$jobId.log
logFile="./translation-errors/$jobId.log"
mkdir -p $(dirname "$logFile")
cp $TMPDIR/log "$logFile"
)
'';
in