mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-24 04:22:50 -05:00
16 lines
438 B
Python
16 lines
438 B
Python
import lib.proc as proc
|
|
|
|
def get_installed():
|
|
return [line.split(' ')[0] for line in pacman(['-Q']).split('\n')[:-1]]
|
|
|
|
def install(package):
|
|
output = pacman(['-S', package], True)
|
|
|
|
def install_all(packages):
|
|
output = pacman(['-S'] + packages, True)
|
|
|
|
def pacman(flags, sudo = False):
|
|
cmd = ['pacman', '--noconfirm'] + flags
|
|
subproc = proc.sudo(cmd) if sudo else proc.exec(cmd)
|
|
return proc.communicate(subproc, cmd)
|