From 96bc5706ab58cf45ed28ac4c2eb2cccddc6ae9f2 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 11 Apr 2003 15:17:36 +0000 Subject: - Apply patches with `patch -f' by default. Add --interactive option top `quilt push' to allow applying patches without `patch -f'. --- scripts/apatch.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts/apatch.in') diff --git a/scripts/apatch.in b/scripts/apatch.in index ca97d13..046e54f 100755 --- a/scripts/apatch.in +++ b/scripts/apatch.in @@ -56,15 +56,15 @@ apply_patch() then gzip -cd $patch_file \ | @PATCH@ $(patch_args $patch) --no-backup-if-mismatch \ - -E $silent + -E $silent $force_apply elif [ "x${patch_file:(-4)}" = "x.bz2" ] then bzip2 -cd $patch_file \ | @PATCH@ $(patch_args $patch) --no-backup-if-mismatch \ - -E $silent + -E $silent $force_apply else @PATCH@ $(patch_args $patch) --no-backup-if-mismatch \ - -E $silent -i $patch_file + -E $silent -i $patch_file $force_apply fi } @@ -133,7 +133,7 @@ apatch() return $status } -options=`getopt -o fqvh --long leave-rejects -- "$@"` +options=`getopt -o fqvh --long leave-rejects,interactive -- "$@"` if [ $? -ne 0 ] then @@ -157,6 +157,9 @@ do --leave-rejects) opt_leave_rejects=1 shift ;; + --interactive) + opt_interactive=1 + shift ;; -h) usage -h ;; --) @@ -172,6 +175,7 @@ fi [ -n "$opt_quiet" ] && silent=-s [ -z "$opt_verbose" ] && silent_unless_verbose=-s +[ -z "$opt_interactive" ] && force_apply=-f patch=$(stripit $1) -- cgit