1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-30 22:42:11 -05:00
dotfiles/lib/yay.py

13 lines
328 B
Python
Raw Normal View History

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)