mirror of
https://github.com/edu4rdshl/archlinux-pkgrecover.git
synced 2026-07-17 23:24:46 +00:00
Only match if package- matches db_dir
There are some packages which have very short names, like `go`. Without this, every `go*` package will match, now only packages with `go-*` will match. It's needed because the output of the pacman db dir contains `$pkgname-$pkgver`
This commit is contained in:
parent
b14d674355
commit
8914f16cc5
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ using_pacman_db() {
|
||||||
# Find the common elements between the two arrays
|
# Find the common elements between the two arrays
|
||||||
for dir in "${modified_db_dirs[@]}"; do
|
for dir in "${modified_db_dirs[@]}"; do
|
||||||
for pkg in "${installed_packages[@]}"; do
|
for pkg in "${installed_packages[@]}"; do
|
||||||
if [[ "$dir" == $pkg* ]]; then
|
if [[ "$dir" == $pkg-* ]]; then
|
||||||
matching_packages+=("$pkg")
|
matching_packages+=("$pkg")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue