From 037dadcc886cb1ff7e196f6f9935c07e42ac33bf Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Sat, 3 Jun 2023 23:25:49 +0100 Subject: [PATCH] updated mkv_to_mp4.sh --- media/mkv_to_mp4.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/media/mkv_to_mp4.sh b/media/mkv_to_mp4.sh index b8948c54..a4a50f45 100755 --- a/media/mkv_to_mp4.sh +++ b/media/mkv_to_mp4.sh @@ -49,7 +49,8 @@ for basedir in "${@:-.}"; do mp4_filepath="${filepath%.mkv}.mp4" #if [ -n "${FORCE_OVERWRITE:-}" ] || if ! [ -s "$mp4_filepath" ]; then - trap_cmd "echo; echo 'removing partially done file:'; rm -fv '$mp4_filepath'; untrap" + # shellcheck disable=SC2016 + trap_cmd 'echo; echo "removing partially done file:"; rm -fv "$mp4_filepath"; untrap' timestamp "converting $filepath => $mp4_filepath" if [ -n "${QUICK:-}" ]; then time nice ffmpeg -i "$filepath" -vcodec copy -acodec copy -scodec mov_text -movflags +faststart "$mp4_filepath" < /dev/null # don't let the ffmpeg command eat the incoming filenames