I am creating a shell script that automates the process of installing Arch Linux AUR packages . I need to list all the package dependencies (to check if they are installed), they look like this: install script:
depends=('sdl' 'libvorbis' 'openal')
The easiest way (or the only idea) that I could come up with is something like this:
grep "depends" PKGBUILD | awk -F"'" '{print $2 "\n" $4 "\n" $6;}'
But the number of dependencies varies from package to package. So, how am I putting names in quotation marks if the number of words changes?
Thanks in advance,
-skazhy
source
share