diff options
author | Igor Wiedler <igor@wiedler.ch> | 2010-03-10 21:37:55 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2010-03-10 21:37:55 +0100 |
commit | 6df10358aa7f9c544b188b51d6d1e8b3e66c8a28 (patch) | |
tree | a1bedecae405b7358d407b2db2a760d1f700e117 /git-tools | |
parent | 3dd9040cc1396f2684a69272404467ebc44f9b58 (diff) | |
download | forums-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.tar forums-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.tar.gz forums-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.tar.bz2 forums-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.tar.xz forums-6df10358aa7f9c544b188b51d6d1e8b3e66c8a28.zip |
[git-tools] use mktemp in pre-commit (thanks nn-)
Diffstat (limited to 'git-tools')
-rwxr-xr-x | git-tools/hooks/pre-commit | 3 |
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 |