summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/quilt.in7
-rw-r--r--configure.ac3
-rw-r--r--doc/sample.quiltrc3
-rw-r--r--quilt.changes7
-rw-r--r--quilt/refresh.in16
5 files changed, 28 insertions, 8 deletions
diff --git a/bin/quilt.in b/bin/quilt.in
index 872bfe9..fef1e13 100644
--- a/bin/quilt.in
+++ b/bin/quilt.in
@@ -43,6 +43,7 @@ quilt_commands()
done
}
+BASH_OPTS=
for arg in "$@"
do
case $arg in
@@ -53,6 +54,10 @@ do
else
args[${#args[@]}]="$arg"
fi ;;
+ --trace)
+ # Trace execution of commands
+ BASH_OPTS=-x ;;
+
*)
args[${#args[@]}]="$arg" ;;
esac
@@ -89,4 +94,4 @@ set -- "${args[@]}"
unset arg args
#. @QUILT@/$command
-bash -c ". @QUILT@/$command" "quilt ${command##*/}" "$@"
+@BASH@ $BASH_OPTS -c ". @QUILT@/$command" "quilt ${command##*/}" "$@"
diff --git a/configure.ac b/configure.ac
index 83e78cc..eaad403 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT([quilt],[0.30],[quilt-dev@nongnu.org])
AC_CONFIG_AUX_DIR(config)
AC_PREREQ(2.53)
-AC_REVISION ($Revision: 1.23 $)
+AC_REVISION ($Revision: 1.24 $)
PACKAGE_RELEASE=1
AC_SUBST(PACKAGE_RELEASE)
@@ -29,6 +29,7 @@ systems implementation of #! being either broken or non-existant.
fi
dnl Check for Bourne-Again Shell
+unset BASH # bash sets this itself!
AC_ARG_WITH(bash, AC_HELP_STRING(
[--with-bash], [name of the bash executable to use]),
[
diff --git a/doc/sample.quiltrc b/doc/sample.quiltrc
index 0a4a24d..0aa72a7 100644
--- a/doc/sample.quiltrc
+++ b/doc/sample.quiltrc
@@ -10,3 +10,6 @@ QUILT_DIFF_OPTS="-p${QUILT_DIFF_OPTS:+ $QUILT_DIFF_OPTS}"
# Define this to generate diffs without timestamps.
#QUILT_NO_DIFF_TIMESTAMPS=yes
+
+# Create backup when refreshing patches.
+QUILT_BACKUP=yes
diff --git a/quilt.changes b/quilt.changes
index 907ad0a..9f1110d 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,6 +1,11 @@
-------------------------------------------------------------------
-Mon Feb 2 13:07:13 CET 2004 - agruen@suse.de
+Mon Feb 2 14:04:31 CET 2004 - agruen@suse.de
+- Fix test for bash in configure.ac.
+- Add `--trace' option to quilt wrapper (runs commands with -x,
+ which prints an execution trace).
+- Add QUILT_BACKUP setting in .quiltrc (creates backup copies
+ when refreshing patches).
- Fix `quilt next'.
-------------------------------------------------------------------
diff --git a/quilt/refresh.in b/quilt/refresh.in
index 798d15f..b36d774 100644
--- a/quilt/refresh.in
+++ b/quilt/refresh.in
@@ -171,15 +171,21 @@ mkdir -p $(dirname $patch_file)
if ! cat_file $patch_file \
| patch_description > $tmpfile2 || \
- ! cat $tmpfile >> $tmpfile2 || \
- ! cat $tmpfile2 \
- | cat_to_file $patch_file
+ ! cat $tmpfile >> $tmpfile2
then
die 1
fi
-if [ $? != 0 ]
+
+if @DIFF@ -q $patch_file $tmpfile2 > /dev/null
+then
+ echo $"Patch $patch is unchanged"
+ exit 0
+fi
+
+if ( [ "$QUILT_BACKUP" = yes ] && \
+ ! cp $patch_file $patch_file~ ) || \
+ ! cat_to_file $patch_file < $tmpfile2
then
- echo $""
die 1
fi