mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
switch find to fd calls
This commit is contained in:
parent
5393fc1f0a
commit
83346ce40b
3 changed files with 6 additions and 6 deletions
|
@ -29,7 +29,7 @@ fi
|
|||
_KERNELVERSION="$(_kver "${_KERNEL}")"
|
||||
_MOD_DIR="/lib/modules/${_KERNELVERSION}"
|
||||
[[ -d "${_MOD_DIR}" ]] || _abort "${_MOD_DIR} is not a valid kernel module directory!"
|
||||
_ALL_MODS="$(fd -t f -u '.ko' . "${_MOD_DIR}" 2>"${_NO_LOG}")"
|
||||
_ALL_MODS="$(fd -t f -u '.ko' "${_MOD_DIR}" 2>"${_NO_LOG}")"
|
||||
_BUILD_DIR="$(_init_rootfs "${_KERNELVERSION}" "${_TARGET_DIR}")" || exit 1
|
||||
_ROOTFS="${_TARGET_DIR:-${_BUILD_DIR}/root}"
|
||||
if (( ${#_HOOKS[*]} == 0 )); then
|
||||
|
|
|
@ -14,10 +14,10 @@ _usage () {
|
|||
exit 0
|
||||
}
|
||||
[[ -z "${1}" || "${1}" != "run" ]] && _usage
|
||||
for i in $(find "${_MODULE_DIR}" | grep '.ko.*'); do
|
||||
for i in $(fd -u -t f '.ko' "${_MODULE_DIR}"); do
|
||||
modinfo -F firmware "${i}" >>modules.txt
|
||||
done
|
||||
find "${_FIRMWARE}" | grep '.zst$' >firmware.txt
|
||||
fd -u -t f 'zst' "${_FIRMWARE}" >firmware.txt
|
||||
cp firmware.txt firmware.orig.txt
|
||||
while read -r i; do
|
||||
sed -i -e "s#${i}##g" firmware.txt
|
||||
|
|
|
@ -44,7 +44,7 @@ for i in /usr/bin/*; do
|
|||
done
|
||||
_result bin-binary-error.txt
|
||||
_run_test "ldd on executables in /usr/lib"
|
||||
for i in $(find /usr/lib -executable -type f | grep -v '.so$'); do
|
||||
for i in $(fd -u -t x -E '*.so.*' -E '*.so' . /usr/lib); do
|
||||
if ldd "${i}" 2>"${_NO_LOG}" | grep -q 'not found'; then
|
||||
echo "${i}" >>lib-binary-error.txt
|
||||
ldd "${i}" | grep 'not found' >>lib-binary-error.txt
|
||||
|
@ -54,7 +54,7 @@ done
|
|||
_result lib-binary-error.txt
|
||||
_run_test "ldd on /usr/lib"
|
||||
# ignore wrong reported libsystemd-shared by libsystemd-core
|
||||
for i in $(find /usr/lib | grep '.so$'); do
|
||||
for i in $(fd -u '.so' /usr/lib); do
|
||||
if ldd "${i}" 2>"${_NO_LOG}" | grep -v -E 'tree_sitter|libsystemd-shared' | grep -q 'not found'; then
|
||||
echo "${i}" >>lib-error.txt
|
||||
ldd "${i}" | grep 'not found' >>lib-error.txt
|
||||
|
@ -94,7 +94,7 @@ _result license-error.txt
|
|||
echo -e "Starting none tracked files in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now."
|
||||
read -r -t 10
|
||||
_run_test "none tracked files in /usr/lib... this takes a while"
|
||||
for i in $(find /usr/lib | grep -v -E '/modules|/udev|/gconv/gconv-modules.cache'); do
|
||||
for i in $(fd -u -E '/modules/' -E ' /udev/' -E 'gconv-modules.cache' . /usr/lib); do
|
||||
pacman -Qo ${i} &>${_NO_LOG} || echo ${i} >> pacman-error.log
|
||||
done
|
||||
_result pacman-error.log
|
||||
|
|
Loading…
Reference in a new issue