Browse Source

WTF bug sur tex2pdf

Sniperovitch 8 years ago
parent
commit
6892c00a4e
1 changed files with 6 additions and 19 deletions
  1. 6 19
      cocktail

+ 6 - 19
cocktail

@@ -7,7 +7,10 @@ end_with_code() {
     rc=1
     rc=1
   fi
   fi
 
 
-  cleanup_working_folder
+  if test "$rc" -eq 0;
+  then
+    cleanup_working_folder
+  fi
   unlock_project
   unlock_project
   verbose "[$FUNCNAME] exiting with RC=[$rc]"
   verbose "[$FUNCNAME] exiting with RC=[$rc]"
   exit $rc
   exit $rc
@@ -252,24 +255,8 @@ tex2pdf() {
   local output=$2
   local output=$2
   verbose "[$FUNCNAME] input=$input output=$output"
   verbose "[$FUNCNAME] input=$input output=$output"
 
 
-  RESPONSE=$(pdflatex -interaction=nonstopmode -output-directory="$WORKING_FOLDER" "$input" >/dev/null)
-  RC=$?
-  local errstr="[$FUNCNAME] RC=[$RC] $RESPONSE"
-  if test "$RC" -eq 0;
-  then
-    verbose "$errstr"
-  else
-    die "$errstr"
-  fi
-  RESPONSE=$(pdflatex -interaction=nonstopmode -output-directory="$WORKING_FOLDER" "$input" >/dev/null)
-  RC=$?
-  local errstr="[$FUNCNAME] RC=[$RC] $RESPONSE"
-  if test "$RC" -eq 0;
-  then
-    verbose "$errstr"
-  else
-    die "$errstr"
-  fi
+  pdflatex -interaction=nonstopmode -output-directory="$WORKING_FOLDER" "$input" >/dev/null
+  pdflatex -interaction=nonstopmode -output-directory="$WORKING_FOLDER" "$input" >/dev/null
 }
 }
 
 
 lock_project() {
 lock_project() {