Make uncrustify.sh compatible with more recent env
authorAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Mon, 1 Jul 2013 03:13:25 +0000 (07:13 +0400)
committerAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Thu, 11 Jul 2013 04:10:02 +0000 (08:10 +0400)
recent mktemp wants template in gmxuncrust.XXXXX format
also canonical *nix based which doesnt have -s arg

Change-Id: Ic054c4eef3d4a49b7bae96b1012ec323a347567d
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
admin/uncrustify.sh

index feec8cd0c87c0f1565950b5f3c9dd8a58f126b1e..915c287e7315e843c78774b9076db4e0ee0dd3d0 100755 (executable)
@@ -132,7 +132,7 @@ then
     echo "See comments in the script file for how to get one."
     exit 2
 fi
-if ! which -s "$UNCRUSTIFY"
+if ! which "$UNCRUSTIFY" 1>/dev/null
 then
     echo "Uncrustify not found: $UNCRUSTIFY"
     exit 2
@@ -150,7 +150,7 @@ then
 fi
 
 # Actual processing starts: create a temporary directory
-tmpdir=`mktemp -d -t gmxuncrust`
+tmpdir=`mktemp -d -t gmxuncrust.XXXXXX`
 
 # Produce a list of changed files
 # Only include files that have uncrustify set as filter in .gitattributes