if diff -u makes zero output, try diff -c instead

This commit is contained in:
Daniel Stenberg 2005-04-28 08:20:33 +00:00
parent 8cf1786296
commit 9fb253388b

View 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;
}