Let find report errors by itself.
Signed-off-by: Jean Delvare <[email protected]>
Reviewed-by: Raphael Hertzog <[email protected]>
---
quilt/scripts/backup-files.in | 15 +++------------
test/delete.test | 2 +-
2 files changed, 4 insertions(+), 13 deletions(-)
--- a/quilt/scripts/backup-files.in
+++ b/quilt/scripts/backup-files.in
@@ -193,21 +193,12 @@ while [ $I -lt ${#FILELIST[@]} ]; do
case "${FILELIST[$I]}" in
-)
- find "$OPT_PREFIX" -mindepth 1 \( -type f -o -type d \) -print
2>/dev/null \
+ find "$OPT_PREFIX" -type f -print \
| while read
do
- if [ -d "$REPLY" ]
- then
- if ! [ -r "$REPLY" ] || ! [ -x "$REPLY" ]
- then
- echo "$REPLY: Permission denied"
- exit 1
- fi
- else
- process_file "${REPLY#$OPT_PREFIX}"
- fi
+ process_file "${REPLY#$OPT_PREFIX}"
done
- if [ $? != 0 ]; then
+ if [ ${PIPESTATUS[0]} != 0 ]; then
exit 1
fi
;;
--- a/test/delete.test
+++ b/test/delete.test
@@ -77,7 +77,7 @@ Test the delete command.
$ quilt delete "test3"
> Removing patch %{P}test3
- > .pc/test3/dir: Permission denied
+ >~ find: `?\.pc/test3/dir'?: Permission denied
$ chmod a+rx .pc/test3/dir
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev