2018-02-09 22:57:31 +01:00
|
|
|
import subprocess
|
2023-09-16 23:23:18 +02:00
|
|
|
from typing import Union
|
2018-02-09 22:57:31 +01:00
|
|
|
|
2023-09-26 12:47:44 +02:00
|
|
|
from .toolchain import AnyToolchain
|
|
|
|
|
|
|
|
def run_quilt(toolchain: AnyToolchain, cwd: str, patches_path: str, *args: str) -> None:
|
2018-02-09 22:57:31 +01:00
|
|
|
env = dict(toolchain.env)
|
|
|
|
env['QUILT_PATCHES'] = patches_path
|
|
|
|
subprocess.check_call(['quilt'] + list(args), cwd=cwd, env=env)
|
|
|
|
|
2023-09-26 12:47:44 +02:00
|
|
|
def push_all(toolchain: AnyToolchain, src_path: str, patches_path: str) -> None:
|
2018-02-09 22:57:31 +01:00
|
|
|
run_quilt(toolchain, src_path, patches_path, 'push', '-a')
|