diff --git a/pkgrecover.sh b/pkgrecover.sh index f679f4a..48dcaa6 100644 --- a/pkgrecover.sh +++ b/pkgrecover.sh @@ -37,9 +37,9 @@ using_pacman_db() { matching_packages=() # Find the common elements between the two arrays - for dir in "${modified_db_dirs[@]}"; do + for db_dir in "${modified_db_dirs[@]}"; do for pkg in "${installed_packages[@]}"; do - if [[ "$dir" == $pkg-* ]]; then + if [[ "$db_dir" == $pkg-* ]]; then matching_packages+=("$pkg") fi done