summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2003-10-28 13:43:12 +0000
committerAndreas Gruenbacher <agruen@suse.de>2003-10-28 13:43:12 +0000
commit99d31b7f2ca0041cb7870c6ebecd44e3fc1700d4 (patch)
tree2df264a22531558dda35b7a3ef1e234f135aa499
parentcaedb55f6e65a7895fc9eb5df032bcf6f6ea49ba (diff)
downloadquilt-99d31b7f2ca0041cb7870c6ebecd44e3fc1700d4.tar.gz
- Change name and semantics of PATCHSCRIPTS variable: Before, if
PATCHSCRIPTS was set, the patches were in $PATCHSCRIPTS/patches. Now, if QUILT_PATCHES is set, the patches are in $QUILT_PATCHES. QUILT_PATCHES defaults to "patches", like before.
-rw-r--r--doc/sample.quiltrc3
-rw-r--r--quilt.changes8
-rw-r--r--quilt/fork.in2
-rw-r--r--quilt/import.in6
-rw-r--r--quilt/new.in2
-rw-r--r--scripts/patchfns.in13
6 files changed, 20 insertions, 14 deletions
diff --git a/doc/sample.quiltrc b/doc/sample.quiltrc
index 8c9502e..3f81d73 100644
--- a/doc/sample.quiltrc
+++ b/doc/sample.quiltrc
@@ -1,2 +1,5 @@
# -p : Show which C function each change is in.
QUILT_DIFF_OPTS="-p${QUILT_DIFF_OPTS:+ $QUILT_DIFF_OPTS}"
+
+# The directory in which patches are found (defaults to "patches").
+#QUILT_PATCHES=patches
diff --git a/quilt.changes b/quilt.changes
index 650bca2..db55e3c 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue Oct 28 14:32:13 CET 2003 - agruen@suse.de
+
+- Change name and semantics of PATCHSCRIPTS variable: Before, if
+ PATCHSCRIPTS was set, the patches were in $PATCHSCRIPTS/patches.
+ Now, if QUILT_PATCHES is set, the patches are in $QUILT_PATCHES.
+ QUILT_PATCHES defaults to "patches", like before.
+
+-------------------------------------------------------------------
Sun Oct 26 17:53:53 CET 2003 - agruen@suse.de
- Get rid of patches_per cache_in `quilt patches'. Remove
diff --git a/quilt/fork.in b/quilt/fork.in
index 5c664fb..f2bee86 100644
--- a/quilt/fork.in
+++ b/quilt/fork.in
@@ -84,7 +84,7 @@ else
patch_file="$patch_file$ext"
fi
-patch_file=$(echo $patch_file | @SED@ -e 's/^'"$(quote_bre $P)"'patches\///')
+patch_file=$(echo $patch_file | @SED@ -e 's/^'"$(quote_bre $QUILT_PATCHES)"'\///')
patch=$(stripit $patch_file)
if patch_in_series $patch || \
diff --git a/quilt/import.in b/quilt/import.in
index 63b7470..9964dce 100644
--- a/quilt/import.in
+++ b/quilt/import.in
@@ -57,7 +57,7 @@ do
case "$1" in
-n)
opt_patch=$(echo "$2" |
- @SED@ -e 's/^'"$(quote_bre $P)"'patches\///' \
+ @SED@ -e 's/^'"$(quote_bre $QUILT_PATCHES)"'\///' \
-e 's/^\.pc\///')
shift 2 ;;
-p)
@@ -87,7 +87,7 @@ fi
if [ -n "$opt_patch" ]
then
patch=$(stripit "$opt_patch")
- patch_file="${P}patches/$opt_patch"
+ patch_file="$QUILT_PATCHES/$opt_patch"
else
patch="$(stripit "$input_file")"
if [ -n "$patch" ]
@@ -97,7 +97,7 @@ else
echo $"Please use -n to specify a patch file name."
exit 1
fi
- patch_file="${P}patches/$opt_patch"
+ patch_file="$QUILT_PATCHES/$opt_patch"
fi
if echo "$patch_file" | grep -q -e $'[ \t]'
diff --git a/quilt/new.in b/quilt/new.in
index bba2929..301de2d 100644
--- a/quilt/new.in
+++ b/quilt/new.in
@@ -59,7 +59,7 @@ then
usage
fi
-patch_file=$(echo $1 | @SED@ -e 's/^'"$(quote_bre $P)"'patches\///')
+patch_file=$(echo $1 | @SED@ -e 's/^'"$(quote_bre $QUILT_PATCHES)"'\///')
patch=$(stripit $patch_file)
if patch_in_series $patch
diff --git a/scripts/patchfns.in b/scripts/patchfns.in
index 2700614..e8f0808 100644
--- a/scripts/patchfns.in
+++ b/scripts/patchfns.in
@@ -15,12 +15,7 @@ then
. $HOME/.quiltrc
fi
-if [ -n "$PATCHSCRIPTS" ]
-then
- P=$PATCHSCRIPTS/
-else
- unset P
-fi
+: ${QUILT_PATCHES:=patches}
if [ -e .pc/series ]
then
@@ -29,7 +24,7 @@ elif [ -e series ]
then
SERIES=series
else
- SERIES=${P}patches/series
+ SERIES=$QUILT_PATCHES/series
fi
DB=".pc/applied-patches"
@@ -70,7 +65,7 @@ patch_file_name()
if [ -e $SERIES ]
then
@AWK@ '/^'"$(quote_re $patch)"'(|\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)/ \
- { printf "'"$P"'patches/%s\n", $1
+ { printf "'"$QUILT_PATCHES"'/%s\n", $1
exit
}
' $SERIES
@@ -393,7 +388,7 @@ stripit()
then
echo $1 |
@SED@ -e 's/^\(\.\/\)*//' \
- -e 's/^'"$(quote_bre $P)"'patches\///' \
+ -e 's/^'"$(quote_bre $QUILT_PATCHES)"'\///' \
-e 's/\.gz$//' -e 's/\.bz2$//' \
-e 's/\.patch$//' -e 's/\.diff\?$//'
fi