mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
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>
This commit is contained in:
parent
17c3de3e4f
commit
4ed12aec30
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user