mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-30 14:32:08 -05:00
16 lines
416 B
Python
16 lines
416 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.exec(cmd, sudo)
|
|
return proc.communicate(subproc, cmd)
|