You are not logged in.
I'm not working hard on this but may be you can tell me the correct way so I do what I want without much testing and research.
My goal is to test if some packages from a list are already installed and if not then execute these commands:
* Search for a description of that package
* Ask if I want to intall it
* then install that package or agregate it to a list
Which should look more or less like this what I came:
curl https://gitlab.archlinux.org/archlinux/archiso/-/raw/master/configs/releng/packages.x86_64|
while read pack; do pacman -Q $pack 2> /dev/null||
( echo $pack&&
pacman -Ss $pack&&
sudo pacman -Syu $pack ); doneThe prioblem is that the last command terminates the loop before I can give a reply, I tried with read -p and I have a similar result but ignoring the last read execution and continuing with the loop till the end.
Can you tell me what I'm doing wrong?
Last edited by Automath (2021-08-29 20:24:21)
Offline
You can just do
pacman -Syu $packagelist --neededrespectively: https://wiki.archlinux.org/title/Pacman … rom_a_list
Offline
You can just do
pacman -Syu $packagelist --neededrespectively: https://wiki.archlinux.org/title/Pacman … rom_a_list
That's good, but the description of the package is still missing, is it there a verbose option?
is it there a verbose option?
yes, but that's not what I need.
I need to run search and sysupgrade at the same time but they are mutually excusive, btw why???
Last edited by Automath (2021-08-29 20:17:02)
Offline
Quick and dirty one-or-two-liner:
curl https://gitlab.archlinux.org/archlinux/archiso/-/raw/master/configs/releng/packages.x86_64 |
pacman -T - | expac -S '%n\n %d' - | vipe | awk 'NF == 1' | sudo pacman -Syu -Requires expac and vipe from moreutils. The latter shows the list of package names and descriptions in your editor. Delete names of packages you don't want (descriptions don't matter -- unless they consist of a single word), exit editor and have pacman install the remaining ones.
Offline