Re: To get tar filename of package from the package name
Reply #2 –
This one will:
pkg='linux-zen'; arch=$(pacman -Qi $pkg | grep Architect | awk '{print $3}'); package="/var/cache/pacman/pkg/"$(pacman -Q $pkg | sed 's/ /-/g')"-$arch.pkg.tar.zst"; echo $package
/var/cache/pacman/pkg/linux-zen-5.17.6.zen1-1-x86_64.pkg.tar.zst
pkg=at-openrc; arch=$(pacman -Qi $pkg | grep Architect | awk '{print $3}'); package="/var/cache/pacman/pkg/"$(pacman -Q $pkg | sed 's/ /-/g')"-$arch.pkg.tar.zst"; echo $package
/var/cache/pacman/pkg/at-openrc-20210506-2-any.pkg.tar.zst