From 4ed12aec30be0a36fff2937039c904526aeb3b79 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 6 Sep 2011 14:17:15 -0400 Subject: makepkg: avoid for loop in deleting manpage hardlinks find can do this all on its own and remain portable. Signed-off-by: Dave Reisner --- scripts/makepkg.sh.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ff1ddf8a..881b6f5e 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -995,10 +995,8 @@ tidy_install() { # find hard links and remove them # the '|| true' part keeps the script from bailing if find returned an # error, such as when one of the man directories doesn't exist - hardlinks="$(find ${MAN_DIRS[@]} \! -name "$file" -samefile "$manpage" 2>/dev/null)" || true - for hl in ${hardlinks}; do - rm -f "${hl}"; - done + find "${MAN_DIRS[@]}" \! -name "$file" -samefile "$manpage" \ + -exec rm -f {} \; 2>/dev/null || true # compress the original gzip -9 "$manpage" # recreate hard links removed earlier -- cgit v1.2.3-24-g4f1b