hello.
i know there is a way to enable AUR from GUI pamac, but i dont want to do that.
i was searching and i didnt find anything related.
how do i enable AUR from command-line using pamac-cli?
something similar to:
pamac enable AUR
i am in the middle of a automated installation process and i want to do that from a script.
Hello,
With pamac cli you can build an AUR package even if AUR is not enabled in Pamac UI.
Because some AUR packages require to have base-devel then you fist install those and with pamac cli just run: pamac build <package-name>
Because Pamac UI settings are stored in /etc/pamac.conf then you just have to uncomment the line:
#EnableAUR
to be
EnableAUR
You can do that via terminal with:
sudo sed -Ei '/EnableAUR/s/^#//' /etc/pamac.conf
To comment it back
sudo sed -Ei '/EnableAUR/s/^/#/' /etc/pamac.conf
And you can do the same with all the lines that enable or disable something in /etc/pamac.conf
really? i remember that i tried pamac install bootiso (some package from aur) and it didnt work. but i didnt try with build. so i guess you can build from AUR even if its not enabled and you cannot install from AUR if its not enabled. correct?
Not in full, as i just learned it from @nikgnomic - but i think it simply seeds out when using ‘s/^#//’ the comment sign in front of EnableAUR and adds it if is not there when using s/^/#/
It’s quite easy. / is a parameter delimiter character (any other can be used but usually it’s /). So we have 4 parameters in the first case EnableAUR, s, ^# and ‘’ (empty).
sed first finds lines that contain EnableAUR
then it executes substitute command: finds a position of ^# (^ means start of line, # means itself) in previously found lines and replaces it with emptiness (i.e deletes it).
The second case is similar, just replaces start of line with #