Sam James <s...@gentoo.org> writes: > Michał Górny <mgo...@gentoo.org> writes: > [...] >>> + local arg >>> + for arg in "$@" ; do >>> + if [[ -d ${arg} ]] ; then >>> + mapfile -t -d '' -O "${#files[@]}" files < <(find >>> "${arg}" -type f -iname '*.a' -print0) >>> + else >>> + files+=( "${arg}" ) >>> + fi >>> + done >> >> Why not just pass all arguments to find(1)? If you pass a file path to >> it, it will just return that file, i.e.: >> >> mapfile -t -d '' files < <(find -H "${@}" -type f -iname '*.a' -print0) >> >> ('-H' to follow symbolic links if passed directly in "$@") > > Oh! Good point. Let me try that.
This breaks some of the tests because we do some direct testing on .o files. But I can't think of why a package would do that besides toolchain packages where special care will be needed anyway, so I'll adjust the tests.