[pacman-dev] [PATCH 2/2] makepkg: Use find -delete instead of -exec rm
Dave Reisner
d at falconindy.com
Mon Mar 4 18:59:51 EST 2013
On Mar 4, 2013 6:33 PM, "Sébastien Luttringer" <seblu at seblu.net> wrote:
>
> This will save us some fork.
No the point was to use exec rm -f -- {} +. We intentionally avoid -delete
for compatibility reasons. Sorry for not being clear.
> Reported-by: Dave Reisner <dreisner at archlinux.org>
> Signed-off-by: Sébastien Luttringer <seblu at seblu.net>
> ---
> scripts/makepkg.sh.in | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index a48512e..1968071 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1491,7 +1491,7 @@ tidy_install() {
> local pt
> for pt in "${PURGE_TARGETS[@]}"; do
> if [[ ${pt} = "${pt//\/}" ]]; then
> - find . ! -type d -name "${pt}" -exec rm
-f -- '{}' \;
> + find . ! -type d -name "${pt}" -delete
> else
> rm -f ${pt}
> fi
> @@ -1500,7 +1500,7 @@ tidy_install() {
>
> if check_option "libtool" "n"; then
> msg2 "$(gettext "Removing "%s" files...")" "libtool"
> - find . ! -type d -name "*.la" -exec rm -f -- '{}' \;
> + find . ! -type d -name "*.la" -delete
> fi
>
> if check_option "staticlibs" "n"; then
> --
> 1.8.1.5
>
>
More information about the pacman-dev
mailing list