From 874fac4e15be441861de05fca98ac714bb679ae3 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Tue, 28 Jan 2014 10:50:13 +0100 Subject: [PATCH] git: pre-commit-texcheck shall not create file "0" --- git/pre-commit-texcheck | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git/pre-commit-texcheck b/git/pre-commit-texcheck index 284849f..8d47a5e 100755 --- a/git/pre-commit-texcheck +++ b/git/pre-commit-texcheck @@ -2,12 +2,14 @@ set -e -[ "$#" > "0" ] && cd "$1" +[ "$#" -gt "0" ] && cd "$1" tmpdir=$(mktemp -d) cleanup() { - rm -r "$tmpdir" + if [ -n "$tmpdir" ]; then + rm -r "$tmpdir" + fi } for f in $(find -name "*.tex"); do -- 2.39.5