summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Quinson <mquinson@debian.org>2003-01-21 09:57:24 +0000
committerMartin Quinson <mquinson@debian.org>2003-01-21 09:57:24 +0000
commit1bc09eea65bdac501048a2a1eff970ac751fdd81 (patch)
tree975571a58c4c313afc77d809db53734e6b731364
parent8cea6b985ed4ff43d6865d485e5cec26fbe09923 (diff)
downloadquilt-1bc09eea65bdac501048a2a1eff970ac751fdd81.tar.gz
A new script appeared in akmp 0.10 version
-rw-r--r--needs-checking/stripspace24
1 files changed, 24 insertions, 0 deletions
diff --git a/needs-checking/stripspace b/needs-checking/stripspace
new file mode 100644
index 0000000..f81397f
--- /dev/null
+++ b/needs-checking/stripspace
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+#
+# Strip whitespace on the end of GNU unified diff insertion lines.
+#
+# Usage:
+# cat foo | stripspace | patch -p1
+# stripspace foo | patch -p1
+#
+# Code fragment taken from the ARM Linux patch system, Copyright
+# (C) Russell King, All Rights Reserved.
+#
+# This script:
+#
+# Copyright (C) 2002 Russell King, All Rights Reserved.
+#
+# This script is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+while (<>) {
+ chomp;
+ s/\s+$// if m/^\+/;
+ print "$_\n";
+}