summaryrefslogtreecommitdiffstats
path: root/needs-checking/rename-patch
diff options
context:
space:
mode:
authorMartin Quinson <mquinson@debian.org>2003-01-21 09:59:35 +0000
committerMartin Quinson <mquinson@debian.org>2003-01-21 09:59:35 +0000
commitfc6281de97e0b6f4b727936d2779695caee2d78f (patch)
tree1d297ab0cf61674f0e9f57d4c5e65023410bee4d /needs-checking/rename-patch
parent1bc09eea65bdac501048a2a1eff970ac751fdd81 (diff)
downloadquilt-fc6281de97e0b6f4b727936d2779695caee2d78f.tar.gz
- Catch up to akmp version 0.10 (only files in need-checking were modified)
- Use bash ; use a proper first line (ie "#! /bin/bash", the space is needed on some rare platforms) - Add a header stating that the code is GPL in all scripts
Diffstat (limited to 'needs-checking/rename-patch')
-rwxr-xr-xneeds-checking/rename-patch22
1 files changed, 19 insertions, 3 deletions
diff --git a/needs-checking/rename-patch b/needs-checking/rename-patch
index e6e1af0..c186170 100755
--- a/needs-checking/rename-patch
+++ b/needs-checking/rename-patch
@@ -1,4 +1,10 @@
-#!/bin/sh
+#! /bin/bash
+
+# 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.
+#
+# See the COPYING and AUTHORS files for more details.
. patchfns 2>/dev/null ||
. /usr/lib/patch-scripts/patchfns 2>/dev/null ||
@@ -9,8 +15,18 @@
exit 1
}
-OLD=$(stripit $1)
-NEW=$(stripit $2)
+if [ $# -eq 1 ]
+then
+ OLD=$(stripit $1)
+ NEW=_$OLD
+elif [ $# -eq 2 ]
+then
+ OLD=$(stripit $1)
+ NEW=$(stripit $2)
+else
+ echo "Usage: rename-patch old [new]"
+ exit 1
+fi
mv $(pc_file_name $OLD) $(pc_file_name $NEW)
mv $(patch_file_name $OLD) $(patch_file_name $NEW)