[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] import improvement
From: |
Holger Eitzenberger |
Subject: |
[Quilt-dev] import improvement |
Date: |
Thu, 21 Dec 2006 11:18:44 +0100 |
Thus saving some keystrokes...
Signed-off-by: Holger Eitzenberger <address@hidden>
Index: quilt/import.in
===================================================================
RCS file: /sources/quilt/quilt/quilt/import.in,v
retrieving revision 1.40
diff -u -p -r1.40 import.in
--- quilt/import.in 1 Jun 2006 10:01:21 -0000 1.40
+++ quilt/import.in 21 Dec 2006 09:51:59 -0000
@@ -19,7 +19,7 @@ fi
usage()
{
- printf $"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}]
patchfile ...\n"
+ printf $"Usage: quilt import [-p num] [-P patch|dir] [-f] [-d {o|a|n}]
patchfile ...\n"
if [ x$1 = x-h ]
then
printf $"
@@ -29,9 +29,10 @@ current top patch, and must be pushed af
-p num
Number of directory levels to strip when applying (default=1)
--P patch
- Patch filename to use inside quilt. This option can only be
- used when importing a single patch.
+-P patch|dir
+ Patch filename to use inside quilt. This option can only be used
+ when importing a single patch. If this is a directory the patch
+ will be added below this directory with the original name.
-f Overwite/update existing patches.
@@ -134,6 +135,10 @@ then
exit 1
fi
+if [ -d "${QUILT_PATCHES:+$QUILT_PATCHES/}$opt_patch" ]; then
+ opt_patch="$opt_patch/${1##*/}"
+fi
+
[ -n "$opt_strip" ] && patch_args="-p$opt_strip"
for patch_file in "$@"