mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

  1. #!/usr/bin/perl -w
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/scripts/patch-pp.pl
  11. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. #
  25. # ROCK Linux "Patch Postprozessor"
  26. #
  27. # This script runs as part of the './scripts/Internal' diff command
  28. # and cleans up the patch 'Clifford' style...
  29. use English;
  30. use strict;
  31. my $skipit=0;
  32. my ($line,$a,$b);
  33. if ($#ARGV != 0 or not -d $ARGV[0]) {
  34. print STDERR "Usage: $0 Reference-Dir\n" ; exit 1
  35. }
  36. while (<STDIN>) {
  37. $line=$_;
  38. if (m,^--- rock-old/([^/]+)/(\S+)\s,) {
  39. $skipit=0; $a=$1; $b=$2;
  40. while ($b=~s,^([^/]+)/?,,) {
  41. $a.="/".$1; $skipit=1 if -l "$ARGV[0]/$a";
  42. # print STDERR "Checked $a ($skipit)\n";
  43. }
  44. }
  45. print $line unless $skipit;
  46. }
  47. 0;