Module Name: src Committed By: uwe Date: Thu Oct 10 21:42:24 UTC 2024
Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: exclude_libs - use find/readlink instead of ls/awk This doesn't only feels right, but also gets rid of a bogus empty line in the list of targets (for all the files that are not symlinks). To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.64 src/usr.sbin/postinstall/postinstall.in:1.65 --- src/usr.sbin/postinstall/postinstall.in:1.64 Thu Oct 10 13:06:22 2024 +++ src/usr.sbin/postinstall/postinstall.in Thu Oct 10 21:42:24 2024 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.64 2024/10/10 13:06:22 uwe Exp $ +# $NetBSD: postinstall.in,v 1.65 2024/10/10 21:42:24 uwe Exp $ # # Copyright (c) 2002-2022 The NetBSD Foundation, Inc. # All rights reserved. @@ -596,8 +596,7 @@ exclude() # exclude_libs() { - local target="$(ls -l -d lib*.so.* 2> /dev/null \ - | ${AWK} '{ print $11; }' \ + local target="$(find lib*.so.* -prune -type l -exec readlink '{}' + 2> /dev/null \ | ${SED} -e 's@.*/@@' | ${SORT} -u)" exclude -t ${target} }