Advertisement
Guest User

qt5.1 diff cleaner

a guest
Jun 26th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 0.61 KB | None | 0 0
  1. #This strips out the benign changes of QT_HEADER and (c)2013 from the diffs
  2. BEGIN { useful = 0; output="";
  3.     ignore["-QT_BEGIN_HEADER"] = 1;
  4.     ignore["-QT_END_HEADER"] = 1;
  5.     ignore["-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)."] = 1;
  6.     ignore["+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies)."] = 1;
  7. }
  8. /^-[^-]/ { if (!($0 in ignore)) useful = useful + 1 }
  9. /^+[^+]/ { if (!($0 in ignore)) useful = useful + 1 }
  10. /^diff/ { if (useful > 0) { print useful output }; useful = 0; output="" }
  11.  {output = (output "\n" $0)} #records all lines
  12. END { if (useful > 0) print output}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement