From 13afb2153327a7deacd4e743a37621d092d98443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aki=20=F0=9F=8C=B9?= Date: Sun, 17 Mar 2019 16:28:35 -0700 Subject: [PATCH] Add an exit code When comcut is part of a larger process, inconsistently creating an output file can cause quite the headache. When exiting with 73, (i.e. EX_CANTCREAT -- A (user specified) output file cannot be created.) subsequent scripts can use that info to prevent trying to work on a non-existent file. --- comcut | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comcut b/comcut index a3f4d4f..d939d6a 100755 --- a/comcut +++ b/comcut @@ -220,6 +220,8 @@ if $hascommercials ; then fi $ffmpegPath -hide_banner -loglevel error -nostdin -i "$metafile" -i "concat:${concat:1}" -c copy -map_metadata 0 -y "$outfile" +else + exit 73 fi for i in "${tempfiles[@]}"