aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-03-10 21:37:55 +0100
committerIgor Wiedler <igor@wiedler.ch>2010-03-10 21:37:55 +0100
commit6df10358aa7f9c544b188b51d6d1e8b3e66c8a28 (patch)
treea1bedecae405b7358d407b2db2a760d1f700e117 /git-tools/hooks
parentMerge branch 'develop-olympus' into git-tools (diff)
downloadphpbb-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.tar.gz
phpbb-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.tar.bz2
phpbb-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.zip
[git-tools] use mktemp in pre-commit (thanks nn-)
Diffstat (limited to 'git-tools/hooks')
-rwxr-xr-xgit-tools/hooks/pre-commit3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-tools/hooks/pre-commit b/git-tools/hooks/pre-commit
index 4a070d130c..937d2d2dc0 100755
--- a/git-tools/hooks/pre-commit
+++ b/git-tools/hooks/pre-commit
@@ -28,13 +28,12 @@ IFS=" "
for file in $(git diff --cached --name-status $against | grep -v -E '^D' | cut -f2 | grep -E '\.php$')
do
# store lint result in a temp file
- tempfile="/tmp/$(basename $0).$$.tmp"
+ tempfile=$(mktemp -t "$(basename $0).XXXXXX")
if ! php -l "$file" >/dev/null 2>"$tempfile"
then
error=1
cat "$tempfile"
fi
- rm -f "$tempfile"
done
unset IFS