accelerator/third_party/cwd_cmd.py
sappho 1d60f3746a
overhaul -> overhaul (#21)
* overhaul the repository

add protobuf

change repo url

try to restore github python syntax highlighter

move breakpad into third_party, update packagescript

* AMBuildifying

remove unnecessary files

Move the git patching into ambuild

move lss to a patch

Add windows compilation support

remove breakpad.bat

move postlink libs

* Overhaul CI (#4)

* Dockerbuild (#5)

* make cwd_cmd spew stdout and stderr

* add proper docker build support

* Overhaul ci (#6)

* Setup CI

* fix checkout

* fix yaml syntax

* no fail fast

* setup CI cache

* Fix pip install

* remove pip git

* update actions, ditch node 16

* small syntax cleanups

* more CI changes

* github doc lied

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>

* final push for perfect dockerbuilds in every scenario that i have been able to find

* rename cicd->dockerbuild

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>

* Add readme, remode duplicate -fPIC

update names of dockerbuild folder in sh files

* cleanup dockerfile (#7)

* Update 0002-Write-FUNC-records-instead-of-PUBLIC-for-ELF-symbols.patch

* Statically link libz, libgcc & libstdc++

* fix submodule path

* Review change + comment patch

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
2024-10-10 21:59:28 -04:00

22 lines
546 B
Python

# vim: set ts=2 sw=2 tw=99 noet ft=python:
import subprocess, sys
argv = sys.argv[3:]
cwd = sys.argv[1]
print('CMD: ' + ' '.join(argv))
print('CWD: ' + cwd)
print('OUT: ' + sys.argv[2])
open(sys.argv[2], 'a').close()
args = { 'args': ' '.join(argv),
'stdout': subprocess.PIPE,
'stderr': subprocess.PIPE,
'shell': True,
'cwd': cwd }
p = subprocess.Popen(**args)
stdout, stderr = p.communicate()
print(stdout.decode("utf-8"))
if p.returncode != 0:
print(stderr.decode("utf-8"))
sys.exit(p.returncode)