Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-09-06 14:17:15 -0400
committerDan McGee <dan@archlinux.org>2011-09-07 21:05:04 -0500
commit4ed12aec30be0a36fff2937039c904526aeb3b79 (patch)
treeeaf764a23d1dca27909b2650aec89e5fc3ded1fb /scripts
parent17c3de3e4f6b03953e22d203d5891b37ffdf941c (diff)
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in6
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