added current gentooimgr

This commit is contained in:
embed@git.macaw.me
2023-12-21 18:53:25 +00:00
parent 349f2b9dea
commit f7303dce15
25 changed files with 6993 additions and 0 deletions

12
gentooimgr/command.py Normal file
View File

@@ -0,0 +1,12 @@
import sys
import gentooimgr.chroot
def command(config, *args):
gentooimgr.chroot.bind()
for a in args:
proc = Popen(a, shell=True, stdout=PIPE, stderr=PIPE)
stdout, stderr = proc.communicate()
if proc.returncode != 0:
sys.stderr.write(f"{stderr}\n")
break
gentooimgr.chroot.unbind()