replace grep with rg

This commit is contained in:
Tobias Powalowski 2024-06-26 14:57:04 +02:00
parent a41219f4b7
commit e994d2ee41

View file

@ -18,13 +18,13 @@ _archboot_check
pacman --noconfirm -Sy
if [[ "${1}" == "base" ]]; then
pacman --noconfirm -S base
_PACKAGE="$(pacman -Qi base | grep Depends | cut -d ":" -f2)"
_PACKAGE="$(LANG=C.UTF-8 pacman -Qi base | rg -o 'Depends.*: (.*)' -r '$1')"
else
_PACKAGE="${1}"
fi
echo "${_PACKAGE}" >binary.txt
#shellcheck disable=SC2086
for i in $(pacman -Ql ${_PACKAGE} | grep "/usr/bin/..*"$ | cut -d' ' -f2); do
for i in $(pacman -Ql ${_PACKAGE} | rg -o '/usr/bin/..*$'); do
command -v "${i}" &>"${_NO_LOG}" || echo "${i}" >>binary.txt
done
# vim: set ft=sh ts=4 sw=4 et: