1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-28 05:27:06 -05:00
dotfiles/lib/yay.py

13 lines
328 B
Python

import lib.proc as proc
def install(package):
output = yay(['-S', package], True)
def install_all(packages):
output = yay(['-S'] + packages, True)
def yay(flags, sudo = False):
cmd = ['yay', '--noconfirm'] + flags
subproc = proc.sudo(cmd) if sudo else proc.exec(cmd)
return proc.communicate(subproc, cmd)