[Pcre-svn] [1016] code/trunk: Style tidies to some scripts.

Góra strony
Delete this message
Autor: Subversion repository
Data:  
Dla: pcre-svn
Temat: [Pcre-svn] [1016] code/trunk: Style tidies to some scripts.
Revision: 1016
          http://vcs.pcre.org/viewvc?view=rev&revision=1016
Author:   ph10
Date:     2012-08-26 17:17:55 +0100 (Sun, 26 Aug 2012)


Log Message:
-----------
Style tidies to some scripts.

Modified Paths:
--------------
    code/trunk/RunGrepTest
    code/trunk/RunTest
    code/trunk/autogen.sh


Modified: code/trunk/RunGrepTest
===================================================================
--- code/trunk/RunGrepTest    2012-08-26 16:07:14 UTC (rev 1015)
+++ code/trunk/RunGrepTest    2012-08-26 16:17:55 UTC (rev 1016)
@@ -40,12 +40,10 @@
 # that lacks a -u option. Try to deal with this; better do the test for the -b
 # option as well.


-cf="diff -ub"
-if diff -u /dev/null /dev/null; then
- if diff -ub /dev/null /dev/null; then cf="diff -ub"; else cf="diff -u"; fi
-else
- if diff -b /dev/null /dev/null; then cf="diff -b"; else cf="diff"; fi
-fi
+cf="diff"
+diff -b /dev/null /dev/null 2>/dev/null && cf="diff -b"
+diff -u /dev/null /dev/null 2>/dev/null && cf="diff -u"
+diff -ub /dev/null /dev/null 2>/dev/null && cf="diff -ub"

# If PCRE has been built in a directory other than the source directory, and
# this test is being run from "make check" as usual, then $srcdir will be

Modified: code/trunk/RunTest
===================================================================
--- code/trunk/RunTest    2012-08-26 16:07:14 UTC (rev 1015)
+++ code/trunk/RunTest    2012-08-26 16:17:55 UTC (rev 1016)
@@ -155,7 +155,8 @@
 # Set up a suitable "diff" command for comparison. Some systems
 # have a diff that lacks a -u option. Try to deal with this.


-if diff -u /dev/null /dev/null; then cf="diff -u"; else cf="diff"; fi
+cf="diff"
+diff -u /dev/null /dev/null 2>/dev/null && cf="diff -u"

# Find the test data


Modified: code/trunk/autogen.sh
===================================================================
--- code/trunk/autogen.sh    2012-08-26 16:07:14 UTC (rev 1015)
+++ code/trunk/autogen.sh    2012-08-26 16:17:55 UTC (rev 1016)
@@ -20,7 +20,7 @@
     echo "Did not find $l" 
 done


-if [ "x$libtoolize" == "x" ]; then
+if [ "x$libtoolize" = "x" ]; then
     echo "Can't find libtoolize on your system"
     exit 1
 fi