Skip to content

Commit

Permalink
Merge pull request #2 from udhos/master
Browse files Browse the repository at this point in the history
Fix mktemp issue
  • Loading branch information
EdmundMai authored Nov 7, 2016
2 parents 09fcbcc + 9bd207d commit e97232e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-redate
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

while [[ $# -gt 1 ]]
do
Expand All @@ -16,7 +16,13 @@ esac
shift
done

tmpfile=$(mktemp gitblah)
die () {
echo >&2 `basename $0`: $*
exit 1
}

tmpfile=$(mktemp gitblah-XXXX)
[ -f "$tmpfile" ] || die "could not get tmpfile=[$tmpfile]"
trap "rm -f $tmpfile" EXIT

if [ -n "${COMMITS+set}" ];
Expand Down

0 comments on commit e97232e

Please sign in to comment.