From f304438ff7c2642aace429c02973abf89c65f5db Mon Sep 17 00:00:00 2001 From: hayao Date: Sat, 6 Nov 2021 23:52:54 +0900 Subject: [PATCH 1/1] [fix] : Update database only once --- system/aur.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/aur.sh b/system/aur.sh index 7cb33be3..215dd2ec 100755 --- a/system/aur.sh +++ b/system/aur.sh @@ -100,9 +100,7 @@ fi # Install if ! pacman -Qq "${aur_helper_package}" 1> /dev/null 2>&1; then - # Update database _oldpwd="$(pwd)" - pacman -Syy "${pacman_args[@]}" # Install depends for _pkg in "${aur_helper_depends[@]}"; do @@ -134,9 +132,12 @@ if ! type -p "${aur_helper_command}" > /dev/null; then exit 1 fi +# Update database +pacman -Syy "${pacman_args[@]}" + installpkg(){ yes | sudo -u "${aur_username}" \ - "${aur_helper_command}" -Sy \ + "${aur_helper_command}" -S \ --color always \ --cachedir "/var/cache/pacman/pkg/" \ "${pacman_args[@]}" \ -- 2.11.0