Fix warning in uncrustify
authorRoland Schulz <roland@utk.edu>
Tue, 16 Jun 2015 06:15:36 +0000 (02:15 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 16 Jun 2015 09:06:26 +0000 (11:06 +0200)
Change-Id: I101a3fcfe4d50191a2237ac0743979a841349cce

admin/uncrustify.sh

index da28285613f3a603577293df089b9567aee7d6b3..a4e2876dc16f738e5fd51bcfe7431855df5ec658 100755 (executable)
@@ -276,7 +276,11 @@ elif [[ $action == update-workdir ]] ; then
 fi
 
 # Report what was done
-sort $tmpdir/messages | tee $srcdir/$warning_file
+if [ "$warning_file" ]; then
+     sort $tmpdir/messages | tee $srcdir/$warning_file
+else
+     sort $tmpdir/messages
+fi
 
 rm -rf $tmpdir
 exit $changes