Better startup script for MacOS 10.10 and 10.11 - don't tell the user it won't work...
[scilab.git] / git_hooks / prepare-commit-msg
index 0bfbee9..78a6f23 100755 (executable)
@@ -9,7 +9,7 @@ COMMIT="$3"
 
 case $SOURCE in
 '')
-    TMP=$(mktemp) && \
+    TMP=`mktemp 2> /dev/null || mktemp -t 'mytmpdir'` && \
     cat $FILE >$TMP && \
     git diff --cached scilab/CHANGES_* |sed -n '/^+/p' |sed -n '/^+++/!p' |sed 's/^.\{1\}//g' >$FILE && \
     cat $TMP >>$FILE && \