From fe0a0c70abd0612c10cffcd73be0349e7b635101 Mon Sep 17 00:00:00 2001 From: Jonny007-MKD Date: Tue, 3 Mar 2015 14:58:20 +0100 Subject: [PATCH] Added exit codes of multicutmkv --- otrDecodeAll | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/otrDecodeAll b/otrDecodeAll index 0b34d0a..f38e785 100755 --- a/otrDecodeAll +++ b/otrDecodeAll @@ -484,15 +484,41 @@ function funcCut { success=$? case $success in 0) - funcLog 4 "Successfully cut" - success=1;; - 5) - funcLog 3 "No cutlist found" - success=0;; + funcLog 4 "Successfully cut";; + 1) + funcLog 1 "multicutmkv: General error!";; + 2) + funcLog 1 "multicutmkv: Missing arguments!";; + 3) + funcLog 1 "multicutmkv: Temporary folder could not be created!";; + 4) + funcLog 1 "multicutmkv: Specified file does not exist!";; + 10) + funcLog 3 "multicutmkv: No cutlist found.";; + 11) + funcLog 2 "multicutmkv: Downloading cutlist failed!";; + 12) + funcLog 2 "multicutmkv: Unknown cutlist format!";; + 20) + funcLog 2 "multicutmkv: ffmsindex failed!";; + 21) + funcLog 2 "multicutmkv: mkvmerge failed!";; + 22) + funcLog 2 "multicutmkv: x264 failed!";; + 6) + funcLog 1 "multicutmkv: Error code 6!";; + 7) + funcLog 1 "multicutmkv: Error code 7!";; + 126) + funcLog 1 "multicutmkv: Additional software needed!";; *) - funcLog 1 "An error occured while cutting: $success!" - success=0;; + funcLog 1 "An unknown error occured while cutting: $success!";; esac + if [ $success -eq 0 ]; then + success=1 + else + success=0 + fi }