From abbdbcc8ca0b4504ebce5fd5eda1334bb2457377 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Mon, 24 Oct 2016 00:54:34 -0200 Subject: [PATCH] Fix usage of mktemp --- git-redate | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git-redate b/git-redate index b3621db..850cd62 100755 --- a/git-redate +++ b/git-redate @@ -16,7 +16,13 @@ esac shift done -tmpfile=$(mktemp gitblah) +die () { + echo `basename $0`: >&2 $* + exit 1 +} + +tmpfile=$(mktemp gitblah-XXXX) +[ -f "$tmpfile" ] || die "could not get tmpfile=[$tmpfile]" trap "rm -f $tmpfile" EXIT if [ -n "${COMMITS+set}" ];