diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-09-06 20:17:15 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-08 04:05:04 +0200 |
commit | 4ed12aec30be0a36fff2937039c904526aeb3b79 (patch) | |
tree | eaf764a23d1dca27909b2650aec89e5fc3ded1fb | |
parent | 17c3de3e4f6b03953e22d203d5891b37ffdf941c (diff) | |
download | pacman-4ed12aec30be0a36fff2937039c904526aeb3b79.tar.gz pacman-4ed12aec30be0a36fff2937039c904526aeb3b79.tar.xz |
makepkg: avoid for loop in deleting manpage hardlinks
find can do this all on its own and remain portable.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | scripts/makepkg.sh.in | 6 |
1 files changed, 2 insertions, 4 deletions
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 |