diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2004-06-06 00:20:07 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2004-06-06 00:20:07 +0000 |
commit | eb1a6de33c1b631e4636ff26dde2945a0db8db74 (patch) | |
tree | f8f6db4094c602e59fbbf9398e6edfaa499e851f /scripts/rpatch.in | |
parent | 77265baff69c1576f9e90e13b9a23d72363ab897 (diff) | |
download | quilt-eb1a6de33c1b631e4636ff26dde2945a0db8db74.tar.gz |
- backup-file.c: Add code to recursively search .pc directories.
Add a "no-op" mode as default, and allow to just unlink files.
- apatch/rpatch: let backup-files search .pc directories instead
of generating temporary file lists.
- rpatch/pop: unlink files of topmost patch after popping instead
of unlinking at each step.
- If QUILTRC is set in the environment, use this as the
configuration file.
Diffstat (limited to 'scripts/rpatch.in')
-rwxr-xr-x | scripts/rpatch.in | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/scripts/rpatch.in b/scripts/rpatch.in index 9b5d6e7..bbe988f 100755 --- a/scripts/rpatch.in +++ b/scripts/rpatch.in @@ -49,7 +49,7 @@ files_may_have_changed() # and report any pending changes. check_for_pending_changes() { - local patch=$1 pc_file=$2 + local patch=$1 local patch_file=$(patch_file_name $patch) local patch_args=$(patch_args $patch) local workdir=$(gen_tempfile -d quilt) status=0 @@ -90,10 +90,10 @@ check_for_pending_changes() fi local remains=$(gen_tempfile) - while read file + for file in $(files_in_patch $patch) do diff_file $file $workdir/$file $file >> $remains - done < $pc_file + done if [ -s $remains ] then @@ -108,35 +108,24 @@ check_for_pending_changes() rpatch() { - local patch=$1 pc_file=$(gen_tempfile) status=0 - - # FIXME backup-files should scan the directory tree itself. - files_in_patch $patch > $pc_file - if ! [ -s $pc_file ] - then - echo $"Patch $patch appears to be empty, removed" - remove_from_db $patch - return 0 - fi + local patch=$1 status=0 trap "" SIGINT if [ -z "$opt_force" ] && \ ( [ -n "$opt_remove" ] || files_may_have_changed $patch ) then - check_for_pending_changes $patch $pc_file || status=1 + check_for_pending_changes $patch || status=1 fi if [ $status -eq 0 ] then echo $"Removing $patch" rm -f "$QUILT_PC/$patch/.timestamp" - @LIB@/backup-files $silent -r -L -f $pc_file \ - -B $QUILT_PC/$patch/ + @LIB@/backup-files $silent -r -B $QUILT_PC/$patch/ - status=$? remove_from_db $patch rm -f $QUILT_PC/$patch~refresh fi - rm -f $pc_file trap - SIGINT return $status } |