Skip to content

Commit 72b8e2d

Browse files
committed
[update] : Faster package check
1 parent c16a9e8 commit 72b8e2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,12 @@ make_packages_repo() {
556556
msg_debug "pkglist.sh ${pkglist_args[*]}"
557557
readarray -t _pkglist < <("${tools_dir}/pkglist.sh" "${pkglist_args[@]}")
558558

559+
#pacman -Sy --config "${build_pacman_conf}"
560+
readarray -t installedpkg < <(pacman-conf -c "${build_pacman_conf}" -l | xargs -I{} pacman -Sql --config "${build_pacman_conf}" --color=never {})
559561
local _pkg
560562
for _pkg in "${_pkglist[@]}"; do
561563
msg_info "Checking ${_pkg}..."
562-
if pacman -Ssq "${_pkg}" 2> /dev/null 1> /dev/null; then
564+
if printf "%s\n" "${installedpkg[@]}" | grep -qx "${_pkg}"; then
563565
_pkglist_install+=("${_pkg}")
564566
else
565567
msg_info "${_pkg} was not found. Install it with yay from AUR"

0 commit comments

Comments
 (0)