]> granicus.if.org Git - curl/commitdiff
if diff -u makes zero output, try diff -c instead
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 Apr 2005 08:20:33 +0000 (08:20 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Apr 2005 08:20:33 +0000 (08:20 +0000)
tests/getpart.pm

index 898ecec6b54f33fa6a9367e09f9316aa9e6ecc67..d1c8ec8566df76f46f8dbb8d8de083adeeda8c5e 100644 (file)
@@ -220,7 +220,11 @@ sub showdiff {
         print TEMP $_;
     }
     close(TEMP);
-    my @out = `diff -u $file2 $file1`;
+    my @out = `diff -u $file2 $file1 2>/dev/null`;
+
+    if(!$out[0]) {
+       @out = `diff -c $file2 $file1 2>/dev/null`;
+    }
 
     return @out;
 }